/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    cn-qingdao = 'slb.aliyuncs.com',
    cn-beijing = 'slb.aliyuncs.com',
    cn-hangzhou = 'slb.aliyuncs.com',
    cn-shanghai = 'slb.aliyuncs.com',
    cn-shenzhen = 'slb.aliyuncs.com',
    cn-hongkong = 'slb.aliyuncs.com',
    ap-southeast-1 = 'slb.aliyuncs.com',
    us-east-1 = 'slb.aliyuncs.com',
    us-west-1 = 'slb.aliyuncs.com',
    cn-shanghai-finance-1 = 'slb.aliyuncs.com',
    cn-shenzhen-finance-1 = 'slb.aliyuncs.com',
    cn-north-2-gov-1 = 'slb.aliyuncs.com',
    ap-northeast-2-pop = 'slb.aliyuncs.com',
    cn-beijing-finance-pop = 'slb.aliyuncs.com',
    cn-beijing-gov-1 = 'slb.aliyuncs.com',
    cn-beijing-nu16-b01 = 'slb.aliyuncs.com',
    cn-edge-1 = 'slb.aliyuncs.com',
    cn-fujian = 'slb.aliyuncs.com',
    cn-haidian-cm12-c01 = 'slb.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'slb.aliyuncs.com',
    cn-hangzhou-finance = 'slb.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'slb.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'slb.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'slb.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'slb.aliyuncs.com',
    cn-hangzhou-test-306 = 'slb.aliyuncs.com',
    cn-hongkong-finance-pop = 'slb.aliyuncs.com',
    cn-huhehaote-nebula-1 = 'slb-api.cn-qingdao-nebula.aliyuncs.com',
    cn-shanghai-et15-b01 = 'slb.aliyuncs.com',
    cn-shanghai-et2-b01 = 'slb.aliyuncs.com',
    cn-shanghai-inner = 'slb.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'slb.aliyuncs.com',
    cn-shenzhen-inner = 'slb.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'slb.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'slb.aliyuncs.com',
    cn-wuhan = 'slb.aliyuncs.com',
    cn-yushanfang = 'slb.aliyuncs.com',
    cn-zhangbei = 'slb.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'slb.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'slb.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'slb.aliyuncs.com',
    eu-west-1-oxs = 'slb.aliyuncs.com',
    rus-west-1-pop = 'slb.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('slb', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddAccessControlListEntryRequest {
  aclEntrys?: string(name='AclEntrys', description='The configuration of the network ACL. Valid values:

*   **entry**: the IP entries that you want to add to the network ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
*   **comment**: the comment on the network ACL.

> You can add at most 50 IP entries to a network ACL in each call. If the IP entry that you want to add to a network ACL already exists, the IP entry is not added. The IP entries that you add must be CIDR blocks.', example='[{"entry":"10.0.\\*\\*.**/24","comment":"privaterule1"},{"entry":"192.168.\\*\\*.**/16","comment":"privaterule2"}]'),
  aclId?: string(name='AclId', description='The ID of the network ACL.', example='acl-bp1l0kk4gxce43kze*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the network ACL.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model AddAccessControlListEntryResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='988CB45E-1643-48C0-87B4-928DDF77EA4'),
}

model AddAccessControlListEntryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddAccessControlListEntryResponseBody(name='body'),
}

/**
 * @summary Adds IP entries to a network access control list (ACL).
 *
 * @description Each network ACL can contain one or more IP addresses or CIDR blocks. Take note of the following limits on network ACLs:
 * *   The number of IP entries that can be added to a network ACL with each Alibaba Cloud account at a time: 50
 * *   The maximum number of IP entries that each network ACL can contain: 300
 *
 * @param request AddAccessControlListEntryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddAccessControlListEntryResponse
 */
async function addAccessControlListEntryWithOptions(request: AddAccessControlListEntryRequest, runtime: Util.RuntimeOptions): AddAccessControlListEntryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclEntrys)) {
    query['AclEntrys'] = request.aclEntrys;
  }
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddAccessControlListEntry',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds IP entries to a network access control list (ACL).
 *
 * @description Each network ACL can contain one or more IP addresses or CIDR blocks. Take note of the following limits on network ACLs:
 * *   The number of IP entries that can be added to a network ACL with each Alibaba Cloud account at a time: 50
 * *   The maximum number of IP entries that each network ACL can contain: 300
 *
 * @param request AddAccessControlListEntryRequest
 * @return AddAccessControlListEntryResponse
 */
async function addAccessControlListEntry(request: AddAccessControlListEntryRequest): AddAccessControlListEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAccessControlListEntryWithOptions(request, runtime);
}

model AddBackendServersRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers that you want to add. Set the following parameters:

*   **ServerId**: Required. This value must be a string. Enter the ID of an ECS instance, elastic network interface (ENI), or elastic container instance. If **ServerId** is set to the ID of an ENI or elastic container instance, **Type** is required.

*   **Weight**: the weight of the backend server. Valid values: **0** to **100**. Default value: **100**.

    If the value is set to 0, no requests are forwarded to the backend server.

*   **Description**: Optional. The description of the backend server. This value must be a string. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

*   **Type**: the type of the backend server. Valid values:

    *   **ecs** (default): an ECS instance
    *   **eni**: an ENI
    *   **eci**: an elastic container instance

>  You can specify ENIs and elastic container instances as the backend servers only for high-performance CLB instances.

*   **ServerIp**: the IP address of the ECS instance, ENI, or elastic container instance
*   **Port**: the backend port

Examples:

*   ECS instance: `[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]`
*   ENI: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }]`
*   ENI with multiple IP addresses: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-113" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]`
*   Elastic container instance: `[{ "ServerId": "eci-xxxxxxxxx", "Weight": "100", "Type": "eci", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-114" }]`

>  The backend servers that you add to a CLB instance must be in the Running state. You can add at most 20 backend servers to a CLB instance in each request.', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-2ze7o5h52g02kkzz******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-beijing'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model AddBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the backend server.', example='backend server'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance, ENI, or elastic container instance.', example='i-2zej4lxhjoq1icu*****'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs** (default): an ECS instance
*   **eni**: an ENI
*   **eci**: an elastic container instance', example='ecs'),
      weight?: string(name='Weight', description='The weight of the backend server.

Valid values: **0 to 100**. Default value: **100**.

If the value is set to **0**, no requests are forwarded to the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-2ze7o5h52g02kkzz****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='34B82C81-F13B-4EEB-99F6-A048C67CC830'),
}

model AddBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddBackendServersResponseBody(name='body'),
}

/**
 * @summary Adds backend servers.
 *
 * @description >  If multiple identical Elastic Compute Service (ECS) instances are specified in a request, only the first ECS instance is added. The other ECS instances are ignored. If the backend server that you add is the same as one of the existing backend servers that are already associated with the listener, an error message is returned.
 *
 * @param request AddBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddBackendServersResponse
 */
async function addBackendServersWithOptions(request: AddBackendServersRequest, runtime: Util.RuntimeOptions): AddBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds backend servers.
 *
 * @description >  If multiple identical Elastic Compute Service (ECS) instances are specified in a request, only the first ECS instance is added. The other ECS instances are ignored. If the backend server that you add is the same as one of the existing backend servers that are already associated with the listener, an error message is returned.
 *
 * @param request AddBackendServersRequest
 * @return AddBackendServersResponse
 */
async function addBackendServers(request: AddBackendServersRequest): AddBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return addBackendServersWithOptions(request, runtime);
}

model AddListenerWhiteListItemRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.

>  This parameter is required when listeners that use different protocols listen on the same port.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1o94dp5i6ea*******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sourceItems?: string(name='SourceItems', description='The IP addresses or CIDR blocks that you want to add to the whitelist.

This parameter takes effect when the **AccessControlStatus** parameter of the listener is set to **open_white_list**.

Separate multiple IP addresses or CIDR blocks with commas (,).

You cannot enter **0.0.0.0** or **0.0.0.0/0**. To disable access control, you can call the [SetListenerAccessControlStatus](https://help.aliyun.com/document_detail/27599.html) operation to set the value of the **AccessControlStatus** parameter to **close**.

This parameter is required.', example='192.168.XX.XX'),
}

model AddListenerWhiteListItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model AddListenerWhiteListItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddListenerWhiteListItemResponseBody(name='body'),
}

/**
 * @summary Adds IP addresses to the whitelist of a listener.
 *
 * @param request AddListenerWhiteListItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddListenerWhiteListItemResponse
 */
async function addListenerWhiteListItemWithOptions(request: AddListenerWhiteListItemRequest, runtime: Util.RuntimeOptions): AddListenerWhiteListItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.sourceItems)) {
    query['SourceItems'] = request.sourceItems;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddListenerWhiteListItem',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds IP addresses to the whitelist of a listener.
 *
 * @param request AddListenerWhiteListItemRequest
 * @return AddListenerWhiteListItemResponse
 */
async function addListenerWhiteListItem(request: AddListenerWhiteListItemRequest): AddListenerWhiteListItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return addListenerWhiteListItemWithOptions(request, runtime);
}

model AddTagsRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The name of this action.

Value: **AddTags**

This parameter is required.', example='139a00604ad-cn-east-hangzhou-'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the SLB instance belongs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The ID of the region to which the SLB instance belongs.

This parameter is required.', example='[{"TagKey":"Key1","TagValue":"Value1"},{"TagKey":"Key2","TagValue":"Value2"}]'),
}

model AddTagsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the SLB instance.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model AddTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddTagsResponseBody(name='body'),
}

/**
 * @description # Limits
 * Before you call this API, note the following limits:
 * *   You can add up to 10 tags to each SLB instance.
 * *   You can add up to five pairs of tags at a time.
 * *   All the tags and keys added to an SLB instance must be unique.
 * *   If you add a tag of which the key is the same as that of an existing tag, but the value is different, the new tag overwrites the existing one.
 *
 * @param request AddTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddTagsResponse
 */
async function addTagsWithOptions(request: AddTagsRequest, runtime: Util.RuntimeOptions): AddTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddTags',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @description # Limits
 * Before you call this API, note the following limits:
 * *   You can add up to 10 tags to each SLB instance.
 * *   You can add up to five pairs of tags at a time.
 * *   All the tags and keys added to an SLB instance must be unique.
 * *   If you add a tag of which the key is the same as that of an existing tag, but the value is different, the new tag overwrites the existing one.
 *
 * @param request AddTagsRequest
 * @return AddTagsResponse
 */
async function addTags(request: AddTagsRequest): AddTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addTagsWithOptions(request, runtime);
}

model AddVServerGroupBackendServersRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers. You can specify up to 20 backend servers in each request.

The following parameters are used to specify the backend servers:

*   **ServerId**: The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

*   **Port**: Required. The port that is used by the backend server. Valid values: **1 to 65535**.

*   **Weight**: The weight of the backend server. Valid values: **0** to **100**. Default value: **100**. If the value is set to 0, no requests are forwarded to the backend server.

*   **Type**: The type of backend server. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **Description**: Optional. The description of the backend server. This parameter is of the STRING type. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

*   **ServerIp**: The IP address of the ECS instance or ENI.

Examples:

*   ECS instance:`  [{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port": "80", "Description": "test-112" }]. `
*   ENI:`  [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168. **. **", "Port":"80","Description":"test-112" }] `
*   ENI with multiple IP addresses:`  [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168. **. **", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166. **. **", "Port":"80","Description":"test-113" }] `

This parameter is required.', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is created.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group.

This parameter is required.', example='rsp-cige6******'),
}

model AddVServerGroupBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the server group.', example='backend server'),
      port?: int32(name='Port', description='The port that is used by the backend server.', example='70'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='vm-231'),
      type?: string(name='Type', description='The type of backend server. Valid values:

*   **ecs**: an ECS instance. This is the default value.
*   **eni**: an ENI.', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group.', example='rsp-cige6j******'),
}

model AddVServerGroupBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddVServerGroupBackendServersResponseBody(name='body'),
}

/**
 * @summary Adds backend servers to a specified server group.
 *
 * @param request AddVServerGroupBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddVServerGroupBackendServersResponse
 */
async function addVServerGroupBackendServersWithOptions(request: AddVServerGroupBackendServersRequest, runtime: Util.RuntimeOptions): AddVServerGroupBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddVServerGroupBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds backend servers to a specified server group.
 *
 * @param request AddVServerGroupBackendServersRequest
 * @return AddVServerGroupBackendServersResponse
 */
async function addVServerGroupBackendServers(request: AddVServerGroupBackendServersRequest): AddVServerGroupBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return addVServerGroupBackendServersWithOptions(request, runtime);
}

model CreateAccessControlListRequest {
  aclName?: string(name='AclName', description='The operation that you want to perform. Set the value to **CreateAccessControlList**.

This parameter is required.', example='rule1'),
  addressIPVersion?: string(name='AddressIPVersion', description='The ID of the region where you want to create the ACL.', example='ipv4'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The name of the ACL. The name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of the ACL that you create must be unique within each region.', example='rg-atstuj3rt******'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key of the bastion host. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='TestKey'),
      value?: string(name='Value', description='The tag value. You can specify at most 20 tag values. The tag value cannot be an empty string.

The tag value must be 1 to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
}

model CreateAccessControlListResponseBody = {
  aclId?: string(name='AclId', description='The IP version. Valid values: **ipv4** and **ipv6**.', example='acl-rj9xpxzcwxrukois****'),
  requestId?: string(name='RequestId', description='The ID of the resource group to which the ACL belongs.', example='988CB45E-1643-48C0-87B4-928DDF77EA49'),
}

model CreateAccessControlListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAccessControlListResponseBody(name='body'),
}

/**
 * @summary Creates an access control list (ACL).
 *
 * @description You can create multiple ACLs. Each ACL can contain one or more IP addresses or CIDR blocks. Before you create an ACL, take note of the following limits:
 * *   An account can have a maximum of 50 ACLs in each region.
 * *   You can add a maximum of 50 IP addresses or CIDR blocks at a time within an account.
 * *   Each ACL can contain a maximum of 300 IP addresses or CIDR blocks.
 *
 * @param request CreateAccessControlListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAccessControlListResponse
 */
async function createAccessControlListWithOptions(request: CreateAccessControlListRequest, runtime: Util.RuntimeOptions): CreateAccessControlListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAccessControlList',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an access control list (ACL).
 *
 * @description You can create multiple ACLs. Each ACL can contain one or more IP addresses or CIDR blocks. Before you create an ACL, take note of the following limits:
 * *   An account can have a maximum of 50 ACLs in each region.
 * *   You can add a maximum of 50 IP addresses or CIDR blocks at a time within an account.
 * *   Each ACL can contain a maximum of 300 IP addresses or CIDR blocks.
 *
 * @param request CreateAccessControlListRequest
 * @return CreateAccessControlListResponse
 */
async function createAccessControlList(request: CreateAccessControlListRequest): CreateAccessControlListResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAccessControlListWithOptions(request, runtime);
}

model CreateDomainExtensionRequest {
  domain?: string(name='Domain', description='The domain name to be created.

This parameter is required.', example='*.example1.com'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port of the HTTPS listener.

Value range:** 1 to 65535**

This parameter is required.', example='443'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp1o94dp5i6earrxxxxxx'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the SLB instance belongs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the certificate used by the domain name.', example='123157xxxxxxx_166f820xxxxxx_1714763408_709981xxxx'),
}

model CreateDomainExtensionResponseBody = {
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the created domain name extension.', example='de-bp1rp7ta19******'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the SLB instance.', example='80'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='A6E7EFC9-0938-40CA-877D-9BEDBD21D357'),
}

model CreateDomainExtensionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDomainExtensionResponseBody(name='body'),
}

/**
 * @summary Creates a domain name extension.
 *
 * @param request CreateDomainExtensionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDomainExtensionResponse
 */
async function createDomainExtensionWithOptions(request: CreateDomainExtensionRequest, runtime: Util.RuntimeOptions): CreateDomainExtensionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateDomainExtension',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a domain name extension.
 *
 * @param request CreateDomainExtensionRequest
 * @return CreateDomainExtensionResponse
 */
async function createDomainExtension(request: CreateDomainExtensionRequest): CreateDomainExtensionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDomainExtensionWithOptions(request, runtime);
}

model CreateLoadBalancerRequest {
  address?: string(name='Address', description='The private IP address of the CLB instance. The private IP address must belong to the destination CIDR block of the vSwitch.', example='192.168.XX.XX'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version that is used by the CLB instance. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  addressType?: string(name='AddressType', description='The network type of the CLB instance. Valid values:

*   **internet**: After an Internet-facing CLB instance is created, the system assigns a public IP address to the CLB instance. Then, the CLB instance can forward requests over the Internet.
*   **intranet**: After an internal-facing CLB instance is created, the system assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over the internal networks.', example='internet'),
  autoPay?: boolean(name='AutoPay', description='Specifies whether to automatically pay for the subscription Internet-facing CLB instance. Valid values:

*   **true**: automatically pays for the CLB instance. After you call this operation, the system automatically completes the payment and creates the CLB instance.
*   **false** (default): After you call the operation, the order is created but the payment is not completed. You can view the pending order in the console. The CLB instance will not be created until you complete the payment.

>  This parameter is supported only by subscription instances created on the Alibaba Cloud China site.', example='true'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s.

Valid values: **1** to **5120**. For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of the maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='10'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests.

>  If you do not specify this parameter, the system uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3'),
  deleteProtection?: string(name='DeleteProtection', description='Specifies whether to enable deletion protection for the CLB instance. Valid values:

*   **on**
*   **off**', example='on'),
  duration?: int32(name='Duration', description='The subscription duration of the Internet-facing CLB instance. Valid values:

*   If **PricingCycle** is set to **month**, the valid values are **1 to 9**.
*   If **PricingCycle** is set to **year**, the valid values are **1 to 5**.

>  This parameter is supported only by subscription instances created on the Alibaba Cloud China site.', example='1'),
  instanceChargeType?: string(name='InstanceChargeType', description='The metering method of the CLB instance. Valid values:

*   **PayBySpec** (default)
*   **PayByCLCU**

>  This parameter is supported only by instances created on the Alibaba Cloud China site and only when **PayType** is set to **PayOnDemand**.', example='PayBySpec'),
  internetChargeType?: string(name='InternetChargeType', description='The metering method of the Internet-facing CLB instance. Valid values:

*   **paybytraffic** (default)

> If you set the value to **paybytraffic**, you do not need to specify **Bandwidth**. Even if you specify **Bandwidth**, the value does not take effect.

*   **paybybandwidth**: pay-by-bandwidth

>  If you set **PayType** to **PayOnDemand** and set **InstanceChargeType** to **PayByCLCU**, you must set InternetChargeType to **paybytraffic**.', example='paybytraffic'),
  loadBalancerName?: string(name='LoadBalancerName', description='The CLB instance name.

The name must be 1 to 80 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

If you do not specify this parameter, the system automatically assigns a name to the CLB instance.', example='lb-bp1o94dp5i6ea****'),
  loadBalancerSpec?: string(name='LoadBalancerSpec', description='The specification of the CLB instance. Valid values:

*   **slb.s1.small**

*   **slb.s2.small**

*   **slb.s2.medium**

*   **slb.s3.small**

*   **slb.s3.medium**

*   **slb.s3.large**

    **

    **Note** If you do not specify this parameter, a shared-resource CLB instance is created. Shared-resource CLB instances are no longer available for purchase. Therefore, you must specify this parameter.

If **InstanceChargeType** is set to **PayByCLCU**, this parameter is invalid and you do not need to specify this parameter.', example='slb.s1.small'),
  masterZoneId?: string(name='MasterZoneId', description='The ID of the primary zone to which the CLB instance belongs.

You can call the [DescribeZone](~~DescribeZone~~) operation to query the primary and secondary zones in the region where you want to create the CLB instance.', example='cn-hangzhou-b'),
  modificationProtectionReason?: string(name='ModificationProtectionReason', description='The reason for enabling the configuration read-only mode. The reason must be 1 to 80 characters in length. It must start with a letter and can contain letters, digits, periods (.), underscores (_), and hyphens (-).

>  This parameter takes effect only when **ModificationProtectionStatus** is set to **ConsoleProtection**.', example='Managed instance'),
  modificationProtectionStatus?: string(name='ModificationProtectionStatus', description='Specifies whether to enable the configuration read-only mode. Valid values:

*   **NonProtection**: disables the configuration read-only mode. After you disable the configuration read-only mode, the value of **ModificationProtectionReason** is cleared.
*   **ConsoleProtection**: enables the configuration read-only mode.

>  If you set this parameter to **ConsoleProtection**, you cannot modify instance configurations in the CLB console. However, you can modify instance configurations by calling API operations.', example='ConsoleProtection'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  payType?: string(name='PayType', description='The billing method of the CLB instance. Set the value to

**PayOnDemand**, which specifies the pay-as-you-go billing method.', example='PayOnDemand'),
  pricingCycle?: string(name='PricingCycle', description='The billing cycle of the subscription Internet-facing CLB instance. Valid values:

*   **month**
*   **year**

>  This parameter is supported only by subscription instances created on the Alibaba Cloud China site.', example='month'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](~~DescribeRegions~~) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-atstuj3rtopt****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  slaveZoneId?: string(name='SlaveZoneId', description='The ID of the secondary zone to which the CLB instance belongs.

You can call the [DescribeZone](~~DescribeZone~~) operation to query the primary and secondary zones in the region where you want to create the CLB instance.', example='cn-hangzhou-d'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key of the bastion host. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='test'),
      value?: string(name='Value', description='The tag value. Valid values of N: **1 to 20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='value'),
    }
  ](name='Tag', description='The tags.'),
  vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the CLB instance belongs.

If you want to deploy the CLB instance in a VPC, this parameter is required. If this parameter is specified, **AddessType** is set to **intranet** by default.', example='vsw-bp12mw1f8k3jgy****'),
  vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the CLB instance belongs.', example='vpc-bp1aevy8sofi8mh1****'),
}

model CreateLoadBalancerResponseBody = {
  address?: string(name='Address', description='The IP address that is allocated to the CLB instance.', example='42.XX.XX.6'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version that is used by the CLB instance.', example='ipv4'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-hddhfjg****'),
  loadBalancerName?: string(name='LoadBalancerName', description='The CLB instance name.', example='lb-bp1o94dp5i6ea****'),
  networkType?: string(name='NetworkType', description='The network type of the CLB instance. Valid values:

*   **vpc**
*   **classic**', example='classic'),
  orderId?: long(name='OrderId', description='The order ID of the subscription CLB instance.', example='20212961978****'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the CLB instance belongs.', example='rg-atstuj3rto****'),
  vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the CLB instance belongs.', example='vsw-255ecr****'),
  vpcId?: string(name='VpcId', description='The ID of the VPC to which the CLB instance belongs.', example='vpc-25dvzy9****'),
}

model CreateLoadBalancerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLoadBalancerResponseBody(name='body'),
}

/**
 * @summary Creates a Classic Load Balancer (CLB) instance.
 *
 * @description *   Before you create a CLB instance, call the [DescribeAvailableResource](~~DescribeAvailableResource~~) operation to query the resources available for purchase in the region where you want to create the CLB instance.
 * *   After a CLB instance is created, you are charged for using the CLB instance.
 * *   The pay-as-you-go billing method supports the pay-by-specification and pay-by-LCU metering methods.
 *
 * @param request CreateLoadBalancerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLoadBalancerResponse
 */
async function createLoadBalancerWithOptions(request: CreateLoadBalancerRequest, runtime: Util.RuntimeOptions): CreateLoadBalancerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.address)) {
    query['Address'] = request.address;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.addressType)) {
    query['AddressType'] = request.addressType;
  }
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.deleteProtection)) {
    query['DeleteProtection'] = request.deleteProtection;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.instanceChargeType)) {
    query['InstanceChargeType'] = request.instanceChargeType;
  }
  if (!Util.isUnset(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!Util.isUnset(request.loadBalancerName)) {
    query['LoadBalancerName'] = request.loadBalancerName;
  }
  if (!Util.isUnset(request.loadBalancerSpec)) {
    query['LoadBalancerSpec'] = request.loadBalancerSpec;
  }
  if (!Util.isUnset(request.masterZoneId)) {
    query['MasterZoneId'] = request.masterZoneId;
  }
  if (!Util.isUnset(request.modificationProtectionReason)) {
    query['ModificationProtectionReason'] = request.modificationProtectionReason;
  }
  if (!Util.isUnset(request.modificationProtectionStatus)) {
    query['ModificationProtectionStatus'] = request.modificationProtectionStatus;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.slaveZoneId)) {
    query['SlaveZoneId'] = request.slaveZoneId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLoadBalancer',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a Classic Load Balancer (CLB) instance.
 *
 * @description *   Before you create a CLB instance, call the [DescribeAvailableResource](~~DescribeAvailableResource~~) operation to query the resources available for purchase in the region where you want to create the CLB instance.
 * *   After a CLB instance is created, you are charged for using the CLB instance.
 * *   The pay-as-you-go billing method supports the pay-by-specification and pay-by-LCU metering methods.
 *
 * @param request CreateLoadBalancerRequest
 * @return CreateLoadBalancerResponse
 */
async function createLoadBalancer(request: CreateLoadBalancerRequest): CreateLoadBalancerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLoadBalancerWithOptions(request, runtime);
}

model CreateLoadBalancerHTTPListenerRequest {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with the listener.

>  If **AclStatus** is set to **on**, this parameter is required.', example='123'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off** (default): no', example='off'),
  aclType?: string(name='AclType', description='The type of the network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. If a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is required.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port that is used by the CLB instance.

Valid values: **1** to **65535**.

>  If the VServerGroupId parameter is not set, this parameter is required.', example='80'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: If -1 is returned, the bandwidth of the listener is unlimited.
*   **1** to **5120**: The sum of the maximum bandwidth that you specify for all listeners of the CLB instance cannot exceed the maximum bandwidth of the CLB instance.

>  This parameter is available only in the Chinese mainland.', example='-1'),
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.

The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($).

>  This parameter is required if the **StickySession** parameter is set to **on** and the **StickySessionType** parameter is set to **server**.', example='B490B5EBF6F3CD402E515D22BCDA1598'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds.

Valid values: **1** to **86400**.

>  If **StickySession** is set to **on** and **StickySessionType** is set to **insert**, this parameter is required.', example='500'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='HTTP_443'),
  forwardPort?: int32(name='ForwardPort', description='The listening port that is used to redirect HTTP requests to HTTPS.', example='443'),
  gzip?: string(name='Gzip', description='Specifies whether to enable `GZIP` compression to compress specific types of files. Valid values:

*   **on** (default)
*   **off**', example='on'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable the health check feature. Valid values:

*   **on**: yes
*   **off**: no

This parameter is required.', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The backend port that is used for health checks.

Valid values: **1** to **65535**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='80'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you do not set the HealthCheckDomain parameter or set the parameter to $_ip, the CLB instance uses the private IP address of each backend server for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length and can contain letters, digits, periods (.), and hyphens (-).

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='172.16.0.0/12'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,).

Valid values: **http_2xx** (default), **http_3xx**, **http_4xx**, and **http_5xx**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='http_2xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method used in HTTP health checks. Valid values: **head** and **get**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend server, such as an Elastic Compute Service (ECS) instance, does not respond to a probe packet within the specified timeout period, the server fails the health check. Unit: seconds.

Valid values: **1** to **300**.

> 
*   If the value of the **HealthCheckTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the timeout period specified by the **HealthCheckTimeout** parameter is ignored and the period of time specified by the **HealthCheckInterval** parameter is used as the timeout period.
*   This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.

The URI must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/).

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds.

Default value: **15**. Valid values: **1** to **60**.

If no request is received within the specified timeout period, SLB closes the connection. When a request is received, SLB establishes a new connection.', example='3'),
  listenerForward?: string(name='ListenerForward', description='Specifies whether to enable HTTP-to-HTTPS redirection. Valid values:

*   **on**: yes
*   **off** (default): no', example='off'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1c9vixxjh92q83tw*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation.', example='cn-hangzhou'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Unit: seconds.

Default value: **60**. Valid values: **1** to **180**.

If no response is received from the backend server within the specified timeout period, CLB sends an `HTTP 504` error code to the client.', example='6'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr** (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence. Valid values:

*   **on**: yes
*   **off** (default): no

This parameter is required.', example='off'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie.

    CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response that is sent to a client. The next request from the client carries this cookie, and the listener will forward this request to the recorded backend server.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener forwards this request to the recorded backend server.

> This parameter is required if the **StickySession** parameter is set to **on**.', example='insert'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key of the bastion host. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='TestKey'),
      value?: string(name='Value', description='The tag value. Valid values of N: **1 to 20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j*****'),
  XForwardedFor?: string(name='XForwardedFor', description='Specifies whether to use the `X-Forwarded-For` header to retrieve client IP addresses. Valid values:

*   **on** (default)
*   **off**', example='on'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Specifies whether to use the `XForwardedFor_ClientSrcPort` header to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Indicates whether the `SLB-ID` header is used to retrieve the ID of the CLB instance. Valid values:

*   **on**
*   **off** (default): no', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Indicates whether the `SLB-IP` header is used to retrieve the virtual IP address (VIP) requested by the client. Valid values:

*   **on**
*   **off** (default): no', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Specifies whether to use the `XForwardedFor_SLBPORT` header to retrieve the listener port of the CLB instance. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Specifies whether to use the `X-Forwarded-Proto` header to retrieve the listener protocol. Valid values:

*   **on**
*   **off** (default): no', example='on'),
}

model CreateLoadBalancerHTTPListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model CreateLoadBalancerHTTPListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLoadBalancerHTTPListenerResponseBody(name='body'),
}

/**
 * @summary Creates an HTTP listener for a Classic Load Balancer (CLB) instance.
 *
 * @description A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](~~StartLoadBalancerListener~~) operation to start the listener. After the listener is started, the listener can forward traffic to backend servers.
 * ## Prerequisites
 * A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](~~StartLoadBalancerListener~~).
 *
 * @param request CreateLoadBalancerHTTPListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLoadBalancerHTTPListenerResponse
 */
async function createLoadBalancerHTTPListenerWithOptions(request: CreateLoadBalancerHTTPListenerRequest, runtime: Util.RuntimeOptions): CreateLoadBalancerHTTPListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.backendServerPort)) {
    query['BackendServerPort'] = request.backendServerPort;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.cookie)) {
    query['Cookie'] = request.cookie;
  }
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.forwardPort)) {
    query['ForwardPort'] = request.forwardPort;
  }
  if (!Util.isUnset(request.gzip)) {
    query['Gzip'] = request.gzip;
  }
  if (!Util.isUnset(request.healthCheck)) {
    query['HealthCheck'] = request.healthCheck;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckMethod)) {
    query['HealthCheckMethod'] = request.healthCheckMethod;
  }
  if (!Util.isUnset(request.healthCheckTimeout)) {
    query['HealthCheckTimeout'] = request.healthCheckTimeout;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.idleTimeout)) {
    query['IdleTimeout'] = request.idleTimeout;
  }
  if (!Util.isUnset(request.listenerForward)) {
    query['ListenerForward'] = request.listenerForward;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestTimeout)) {
    query['RequestTimeout'] = request.requestTimeout;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  if (!Util.isUnset(request.stickySessionType)) {
    query['StickySessionType'] = request.stickySessionType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.XForwardedFor)) {
    query['XForwardedFor'] = request.XForwardedFor;
  }
  if (!Util.isUnset(request.XForwardedFor_ClientSrcPort)) {
    query['XForwardedFor_ClientSrcPort'] = request.XForwardedFor_ClientSrcPort;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBID)) {
    query['XForwardedFor_SLBID'] = request.XForwardedFor_SLBID;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBIP)) {
    query['XForwardedFor_SLBIP'] = request.XForwardedFor_SLBIP;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBPORT)) {
    query['XForwardedFor_SLBPORT'] = request.XForwardedFor_SLBPORT;
  }
  if (!Util.isUnset(request.XForwardedFor_proto)) {
    query['XForwardedFor_proto'] = request.XForwardedFor_proto;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLoadBalancerHTTPListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an HTTP listener for a Classic Load Balancer (CLB) instance.
 *
 * @description A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](~~StartLoadBalancerListener~~) operation to start the listener. After the listener is started, the listener can forward traffic to backend servers.
 * ## Prerequisites
 * A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](~~StartLoadBalancerListener~~).
 *
 * @param request CreateLoadBalancerHTTPListenerRequest
 * @return CreateLoadBalancerHTTPListenerResponse
 */
async function createLoadBalancerHTTPListener(request: CreateLoadBalancerHTTPListenerRequest): CreateLoadBalancerHTTPListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLoadBalancerHTTPListenerWithOptions(request, runtime);
}

model CreateLoadBalancerHTTPSListenerRequest {
  aclId?: string(name='AclId', description='The ID of the network access control list (ACL) that is associated with the listener.

>  If **AclStatus** is set to **on**, this parameter is required.', example='nacl-a2do9e413e0spzasx****'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  aclType?: string(name='AclType', description='The type of the network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the allowlist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are denied. The blacklist applies to scenarios in which you want to deny access from specific IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is required.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port that is used by the CLB instance. Valid values: **1** to **65535**.

If the VServerGroupId parameter is not set, this parameter is required.', example='80'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s.

Valid values: **-1** and **1** to **5120**.

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, you can set this parameter to **-1**. This way, the bandwidth of the listener is unlimited.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing SLB instance, you can specify the bandwidth limit of each listener. The sum of bandwidth limits that you set for all listeners cannot exceed the bandwidth limit of the SLB instance.

This parameter is required.', example='-1'),
  CACertificateId?: string(name='CACertificateId', description='The ID of the certification authority (CA) certificate.

If both the CA certificate and the server certificate are uploaded, mutual authentication is used.

If you upload only the server certificate, one-way authentication is used.', example='139a00604ad-cn-east-hangzh****'),
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.

The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($).

>  This parameter is required if the **StickySession** parameter is set to **on** and the **StickySessionType** parameter is set to **server**.', example='B490B5EBF6F3CD402E515D22BCDA****'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds.

Valid values: **1** to **86400**.

>  If **StickySession** is set to **on** and **StickySessionType** is set to **insert**, this parameter is required.', example='500'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='HTTPS_443'),
  enableHttp2?: string(name='EnableHttp2', description='Specifies whether to enable HTTP/2. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  gzip?: string(name='Gzip', description='Specifies whether to enable `Gzip` compression to compress specific types of files. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable the health check feature. Valid values:

*   **on**: yes
*   **off**: no

This parameter is required.', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='8080'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you do not set the HealthCheckDomain parameter or set the parameter to $_ip, the CLB instance uses the private IP address of each backend server for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length and can contain letters, digits, periods (.), and hyphens (-).

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='172.XX.XX.16'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,).

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='http_2xx,http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method used in HTTP health checks. Valid values: **head** and **get**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend server, such as an Elastic Compute Service (ECS) instance, does not return a health check response within the specified timeout period, the server fails the health check. Unit: seconds.

Valid values: **1** to **300**.

> 
*   If the value of the **HealthCheckTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the timeout period specified by the **HealthCheckTimeout** parameter is ignored and the period of time specified by the **HealthCheckInterval** parameter is used as the timeout period.
*   This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.

The URI must be 1 to 80 characters in length, and can contain letters, digits, and the following special characters: `-/.%?#&`. The URI must start with a forward slash (`/`), but cannot be a single forward slash (`/`).

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Valid values: **1 to 60**. Default value: **15**. Unit: seconds.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='12'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1o94dp5i6earr****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.', example='cn-hangzhou'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Valid values: **1 to 180**. Default value: **60**. Unit: seconds.

If no response is received from a backend server within the specified timeout period, CLB returns the HTTP 504 status code to the client.', example='23'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers with higher weights receive more requests than those with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='idkp-123-cn-test-****'),
  stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence. Valid values:

*   **on**: yes
*   **off**: no

This parameter is required.', example='on'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values: **insert** and **server**.

*   **insert**: inserts a cookie.

    CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response packet that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener will distribute the request to the recorded backend server.

>  This parameter is required if the **StickySession** parameter is set to **on**.', example='insert'),
  TLSCipherPolicy?: string(name='TLSCipherPolicy', description='The Transport Layer Security (TLS) security policy. Each security policy contains TLS protocol versions and cipher suites available for HTTPS.

*   **tls_cipher_policy_1_0**:

    Supported TLS versions: TLS 1.0, TLS 1.1, and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_1**:

    Supported TLS versions: TLS 1.1 and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2_strict**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA

*   **tls_cipher_policy_1_2_strict_with_1_3**

    Supported TLS versions: TLS 1.2 and TLS 1.3

    Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA', example='tls_cipher_policy_1_1'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='TestKey'),
      value?: string(name='Value', description='The tag value.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.

>  This parameter takes effect only if the **HealthCheck** parameter is set to **on**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group.', example='rsp-cige6j5e7p****'),
  XForwardedFor?: string(name='XForwardedFor', description='Specifies whether to use the `X-Forwarded-For` header to retrieve client IP addresses. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Specifies whether to use the `XForwardedFor_ClientSrcPort` header to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Specifies whether to use the `SLB-ID` header to retrieve the ID of the CLB instance. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Specifies whether to use the `SLB-IP` header to retrieve the virtual IP address (VIP) of the client. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Specifies whether to use the `XForwardedFor_SLBPORT` header to retrieve the listener port of the CLB instance. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Specifies whether to use the `X-Forwarded-Proto` header to retrieve the listener protocol. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
}

model CreateLoadBalancerHTTPSListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model CreateLoadBalancerHTTPSListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLoadBalancerHTTPSListenerResponseBody(name='body'),
}

/**
 * @summary Creates an HTTPS listener.
 *
 * @description A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to start the listener. After the listener is started, the listener can forward traffic to backend servers.
 * ## Prerequisites
 * A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://www.alibabacloud.com/help/en/server-load-balancer/latest/createloadbalancer-2).
 *
 * @param request CreateLoadBalancerHTTPSListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLoadBalancerHTTPSListenerResponse
 */
async function createLoadBalancerHTTPSListenerWithOptions(request: CreateLoadBalancerHTTPSListenerRequest, runtime: Util.RuntimeOptions): CreateLoadBalancerHTTPSListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.backendServerPort)) {
    query['BackendServerPort'] = request.backendServerPort;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.CACertificateId)) {
    query['CACertificateId'] = request.CACertificateId;
  }
  if (!Util.isUnset(request.cookie)) {
    query['Cookie'] = request.cookie;
  }
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.enableHttp2)) {
    query['EnableHttp2'] = request.enableHttp2;
  }
  if (!Util.isUnset(request.gzip)) {
    query['Gzip'] = request.gzip;
  }
  if (!Util.isUnset(request.healthCheck)) {
    query['HealthCheck'] = request.healthCheck;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckMethod)) {
    query['HealthCheckMethod'] = request.healthCheckMethod;
  }
  if (!Util.isUnset(request.healthCheckTimeout)) {
    query['HealthCheckTimeout'] = request.healthCheckTimeout;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.idleTimeout)) {
    query['IdleTimeout'] = request.idleTimeout;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestTimeout)) {
    query['RequestTimeout'] = request.requestTimeout;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  if (!Util.isUnset(request.stickySessionType)) {
    query['StickySessionType'] = request.stickySessionType;
  }
  if (!Util.isUnset(request.TLSCipherPolicy)) {
    query['TLSCipherPolicy'] = request.TLSCipherPolicy;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.XForwardedFor)) {
    query['XForwardedFor'] = request.XForwardedFor;
  }
  if (!Util.isUnset(request.XForwardedFor_ClientSrcPort)) {
    query['XForwardedFor_ClientSrcPort'] = request.XForwardedFor_ClientSrcPort;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBID)) {
    query['XForwardedFor_SLBID'] = request.XForwardedFor_SLBID;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBIP)) {
    query['XForwardedFor_SLBIP'] = request.XForwardedFor_SLBIP;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBPORT)) {
    query['XForwardedFor_SLBPORT'] = request.XForwardedFor_SLBPORT;
  }
  if (!Util.isUnset(request.XForwardedFor_proto)) {
    query['XForwardedFor_proto'] = request.XForwardedFor_proto;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLoadBalancerHTTPSListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates an HTTPS listener.
 *
 * @description A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to start the listener. After the listener is started, the listener can forward traffic to backend servers.
 * ## Prerequisites
 * A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://www.alibabacloud.com/help/en/server-load-balancer/latest/createloadbalancer-2).
 *
 * @param request CreateLoadBalancerHTTPSListenerRequest
 * @return CreateLoadBalancerHTTPSListenerResponse
 */
async function createLoadBalancerHTTPSListener(request: CreateLoadBalancerHTTPSListenerRequest): CreateLoadBalancerHTTPSListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLoadBalancerHTTPSListenerWithOptions(request, runtime);
}

model CreateLoadBalancerTCPListenerRequest {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with the listener.

>  If **AclStatus** is set to **on**, this parameter is required.', example='1323'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off** (default): no', example='off'),
  aclType?: string(name='AclType', description='The type of the ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application.

    Your service may be adversely affected if the whitelist is not properly configured.

    If a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener. If a whitelist is configured but no IP address is added to the whitelist, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is required.', example='black'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port used by the CLB instance.

Valid values: **1** to **65535**.

If the **VServerGroupId** parameter is not set, this parameter is required.', example='80'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, this value can be set to -1, which specifies unlimited bandwidth.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of the maximum bandwidth values that you set for all listeners cannot exceed the maximum bandwidth of the CLB instance.

This parameter is required.', example='-1'),
  connectionDrain?: string(name='ConnectionDrain', description='Specifies whether to enable connection draining. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  connectionDrainTimeout?: int32(name='ConnectionDrainTimeout', description='The timeout period of connection draining. Unit: seconds.

Valid values: **10** to **900**.

>  This parameter is required if **ConnectionDrain** is set to **on**.', example='300'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='tcp_80'),
  establishedTimeout?: int32(name='EstablishedTimeout', description='The timeout period of a connection. Unit: seconds.

Valid values: **10** to **900**.', example='500'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.

If this parameter is not set, the backend port specified by **BackendServerPort** is used for health checks.', example='80'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The maximum timeout period of a health check response. Unit: seconds.

Valid values: **1** to **300**.

Default value: **5**.', example='100'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that you want to use for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you do not set the HealthCheckDomain parameter or set the parameter to $_ip, the CLB instance uses the private IP address of each backend server for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), and hyphens (-).', example='172.XX.XX.6'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Valid values:

*   **http_2xx**(default)
*   **http_3xx**
*   **http_4xx**
*   **http_5xx**', example='http_2xx,http_3xx'),
  healthCheckSwitch?: string(name='HealthCheckSwitch', description='Specifies whether to enable the health check feature. Valid values:

*   **on** (default): yes
*   **off**: no', example='on'),
  healthCheckType?: string(name='HealthCheckType', description='The type of health checks. Valid values:

*   **tcp** (default)
*   **http**', example='tcp'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks. The URI must be 1 to 80 characters in length, and can contain only digits, letters, hyphens (-), forward slashes (/), periods (.), percent signs (%), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/).

You can set this parameter when the TCP listener requires HTTP health checks. If you do not set this parameter, TCP health checks are performed.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08ex****'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.

>  You cannot set both VServerGroupId and MasterSlaveServerGroupId.', example='rsp-0bfucw****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  persistenceTimeout?: int32(name='PersistenceTimeout', description='The timeout period of session persistence. Unit: seconds.

Valid values: **0 to 3600**.

Default value: **0**. If the default value is used, the system disables session persistence.', example='0'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false** (default): no', example='false'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The routing algorithm. Valid values:

*   **wrr** (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.
*   **sch**: specifies consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.
*   **tch**: specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are distributed to the same backend server.

>  Only high-performance CLB instances support the **sch** and **tch** consistent hashing algorithms.', example='wrr'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='TestKey'),
      value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be at most 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j****'),
  healthCheckInterval?: int32(name='healthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.', example='3'),
}

model CreateLoadBalancerTCPListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model CreateLoadBalancerTCPListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLoadBalancerTCPListenerResponseBody(name='body'),
}

/**
 * @summary Creates a TCP listener.
 *
 * @description >  A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to enable the listener to forward traffic to backend servers.
 *
 * @param request CreateLoadBalancerTCPListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLoadBalancerTCPListenerResponse
 */
async function createLoadBalancerTCPListenerWithOptions(request: CreateLoadBalancerTCPListenerRequest, runtime: Util.RuntimeOptions): CreateLoadBalancerTCPListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.backendServerPort)) {
    query['BackendServerPort'] = request.backendServerPort;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.connectionDrain)) {
    query['ConnectionDrain'] = request.connectionDrain;
  }
  if (!Util.isUnset(request.connectionDrainTimeout)) {
    query['ConnectionDrainTimeout'] = request.connectionDrainTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.establishedTimeout)) {
    query['EstablishedTimeout'] = request.establishedTimeout;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckConnectTimeout)) {
    query['HealthCheckConnectTimeout'] = request.healthCheckConnectTimeout;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckSwitch)) {
    query['HealthCheckSwitch'] = request.healthCheckSwitch;
  }
  if (!Util.isUnset(request.healthCheckType)) {
    query['HealthCheckType'] = request.healthCheckType;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.persistenceTimeout)) {
    query['PersistenceTimeout'] = request.persistenceTimeout;
  }
  if (!Util.isUnset(request.proxyProtocolV2Enabled)) {
    query['ProxyProtocolV2Enabled'] = request.proxyProtocolV2Enabled;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['healthCheckInterval'] = request.healthCheckInterval;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLoadBalancerTCPListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a TCP listener.
 *
 * @description >  A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to enable the listener to forward traffic to backend servers.
 *
 * @param request CreateLoadBalancerTCPListenerRequest
 * @return CreateLoadBalancerTCPListenerResponse
 */
async function createLoadBalancerTCPListener(request: CreateLoadBalancerTCPListenerRequest): CreateLoadBalancerTCPListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLoadBalancerTCPListenerWithOptions(request, runtime);
}

model CreateLoadBalancerUDPListenerRequest {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with the listener.

If **AclStatus** is set to **on**, this parameter is required.', example='123'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off** (default): no', example='off'),
  aclType?: string(name='AclType', description='The type of the network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specific IP addresses to access an application. After a whitelist is configured, only IP addresses in the whitelist can access the CLB listener. Risks may arise if the whitelist is improperly set.

    If a whitelist is configured but no IP address is added to the whitelist, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are blocked. Blacklists apply to scenarios in which you want to deny access from specific IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

If **AclStatus** is set to **on**, this parameter is required.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port used by the CLB instance.

Valid values: **1** to **65535**.

If the **VServerGroupId** parameter is not set, this parameter is required.', example='80'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

**-1**: For a pay-by-data-transfer Internet-facing CLB instance, you can set this parameter to **-1**. This way, the bandwidth of the listener is unlimited.

This parameter is required.', example='-1'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='udp_80'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.

If this parameter is not set, the backend port specified by **BackendServerPort** is used for health checks.', example='80'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period of a health check.

If a backend server, such as an Elastic Compute Service (ECS) instance, does not respond to a probe packet within the specified timeout period, the server fails the health check. Unit: seconds.

Valid values: **1** to **300**.', example='100'),
  healthCheckSwitch?: string(name='HealthCheckSwitch', description='Specifies whether to enable the health check feature. Valid values:

*   **on** (default): yes
*   **off**: no', example='on'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1ygod3yctvg1y7****'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.

>  You can set only one of the VServerGroupId and MasterSlaveServerGroupId parameters.', example='rsp-0bfucwu****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false** (default): no', example='false'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The routing algorithm. Valid values:

*   **wrr** (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.
*   **sch**: specifies consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.
*   **tch**: specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are distributed to the same backend server.
*   **qch**: specifies consistent hashing that is based on QUIC connection IDs. Requests that contain the same QUIC connection ID are distributed to the same backend server.

Only high-performance CLB instances support the sch, tch, and qch consistent hashing algorithms.', example='wrr'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='TestKey'),
      value?: string(name='Value', description='The tag value. Valid values of N: **1 to 20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j8****'),
  healthCheckExp?: string(name='healthCheckExp', description='The response string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits.', example='ok'),
  healthCheckInterval?: int32(name='healthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.', example='3'),
  healthCheckReq?: string(name='healthCheckReq', description='The request string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits.', example='hello'),
}

model CreateLoadBalancerUDPListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='06F00FBB-3D9E-4CCE-9D43-1A6946A75556'),
}

model CreateLoadBalancerUDPListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLoadBalancerUDPListenerResponseBody(name='body'),
}

/**
 * @summary Creates a UDP listener.
 *
 * @description UDP listeners of Classic Load Balancer (CLB) instances in a classic network cannot pass client IP addresses to backend servers.
 * >  A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to enable the listener to forward traffic to backend servers.
 *
 * @param request CreateLoadBalancerUDPListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLoadBalancerUDPListenerResponse
 */
async function createLoadBalancerUDPListenerWithOptions(request: CreateLoadBalancerUDPListenerRequest, runtime: Util.RuntimeOptions): CreateLoadBalancerUDPListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.backendServerPort)) {
    query['BackendServerPort'] = request.backendServerPort;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckConnectTimeout)) {
    query['HealthCheckConnectTimeout'] = request.healthCheckConnectTimeout;
  }
  if (!Util.isUnset(request.healthCheckSwitch)) {
    query['HealthCheckSwitch'] = request.healthCheckSwitch;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.proxyProtocolV2Enabled)) {
    query['ProxyProtocolV2Enabled'] = request.proxyProtocolV2Enabled;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.healthCheckExp)) {
    query['healthCheckExp'] = request.healthCheckExp;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['healthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckReq)) {
    query['healthCheckReq'] = request.healthCheckReq;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLoadBalancerUDPListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a UDP listener.
 *
 * @description UDP listeners of Classic Load Balancer (CLB) instances in a classic network cannot pass client IP addresses to backend servers.
 * >  A newly created listener is in the **stopped** state. After a listener is created, you can call the [StartLoadBalancerListener](https://help.aliyun.com/document_detail/27597.html) operation to enable the listener to forward traffic to backend servers.
 *
 * @param request CreateLoadBalancerUDPListenerRequest
 * @return CreateLoadBalancerUDPListenerResponse
 */
async function createLoadBalancerUDPListener(request: CreateLoadBalancerUDPListenerRequest): CreateLoadBalancerUDPListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLoadBalancerUDPListenerWithOptions(request, runtime);
}

model CreateMasterSlaveServerGroupRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp1hv944r69al4j******'),
  masterSlaveBackendServers?: string(name='MasterSlaveBackendServers', description='The backend servers in the primary/secondary server group.

The value of this parameter must be a STRING list in the JSON format. You can specify up to 20 elements in each request.

*   **ServerId**: Required. Specify the ID of the backend server. The value must be of the STRING type.

*   **Port**: Required. Specify the port that is used by the backend server. The value must be of the INTEGER type. Valid values: **1** to **65535**.

*   **Weight**: Required. Specify the weight of the backend server. The value must be of the INTEGER type. Valid values: **0** to **100**.

*   \\\\*\\\\*Description \\\\*\\\\*: Optional. The description of the backend server. The value must be of the STRING type. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

*   **ServerType**: the type of the backend server. The value must be of the STRING type. Valid values:

    *   **Master**

*   **Slave**

*   **Type**: the service type of backend server. The value must be of the STRING type. Valid values:

    *   **ecs**
    *   **eni**

*   **ServerIp**

A primary/secondary server group can contain up to two backend servers.

If you do not specify this parameter, an empty primary/secondary server group is created.

Examples:

*   ECS instances:

`[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"82","ServerType":"Master","Description":"test-112" }, { "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"84","ServerType":"Slave","Description":"test-112" }]`

*   ENIs:

    `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "Port":"80","ServerType":"Master","Description":"test-112" }, { "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","ServerType":"Slave","Description":"test-112" }]`

*   IP addresses of ENIs:

    `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni","ServerIp": "192.168.\\*\\*.**", "Port":"80","ServerType":"Master","Description":"test-112" }, { "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni","ServerIp": "192.168.\\*\\*.**", "Port":"80","ServerType":"Slave","Description":"test-112" }]`', example='[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs",  "Port":"82","ServerType":"Master","Description":"test-112" },  { "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs",  "Port":"84","ServerType":"Slave","Description":"test-112" }]'),
  masterSlaveServerGroupName?: string(name='MasterSlaveServerGroupName', description='The name of the primary/secondary server group.', example='Group1'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='资源标签键。N的取值范围：**1**~**20**。一旦输入该值，则不允许为空字符串。

最多支持64个字符，不能以`aliyun`和`acs:`开头，不能包含`http://`或者`https://`。', example='test'),
      value?: string(name='Value', description='资源的标签值。N的取值范围：**1~20**。一旦输入该值，可以为空字符串。
最多支持128个字符，不能以`aliyun`和`acs:`开头，不能包含`http://`或者`https://`。', example='1'),
    }
  ](name='Tag', description='标签列表。'),
}

model CreateMasterSlaveServerGroupResponseBody = {
  masterSlaveBackendServers?: {
    masterSlaveBackendServer?: [ 
    {
      description?: string(name='Description', description='The description of the primary/secondary server group.', example='test-112'),
      port?: int32(name='Port', description='The port that is used by the backend server.', example='82'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI that is added.', example='i-bp1fq61enf4loa5i****'),
      serverType?: string(name='ServerType', description='The type of the backend server.

Valid values: **Master** and **Slave**.', example='Master'),
      type?: string(name='Type', description='The service type of the backend server. Valid values:

*   **ecs**
*   **eni**', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='MasterSlaveBackendServer')
  }(name='MasterSlaveBackendServers', description='The backend servers in the primary/secondary server group.'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The primary/secondary server group ID.', example='rsp-bp19au4******'),
  requestId?: string(name='RequestId', description='The request ID.', example='7CA4DB76-4D32-523B-822E-5C9494613D46'),
}

model CreateMasterSlaveServerGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMasterSlaveServerGroupResponseBody(name='body'),
}

/**
 * @summary Creates a primary/secondary server group. A primary/secondary server group can contain only two Elastic Compute Service (ECS) instances. One of the ECS instances functions as the primary server and the other functions as the secondary server.
 *
 * @param request CreateMasterSlaveServerGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMasterSlaveServerGroupResponse
 */
async function createMasterSlaveServerGroupWithOptions(request: CreateMasterSlaveServerGroupRequest, runtime: Util.RuntimeOptions): CreateMasterSlaveServerGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.masterSlaveBackendServers)) {
    query['MasterSlaveBackendServers'] = request.masterSlaveBackendServers;
  }
  if (!Util.isUnset(request.masterSlaveServerGroupName)) {
    query['MasterSlaveServerGroupName'] = request.masterSlaveServerGroupName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMasterSlaveServerGroup',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a primary/secondary server group. A primary/secondary server group can contain only two Elastic Compute Service (ECS) instances. One of the ECS instances functions as the primary server and the other functions as the secondary server.
 *
 * @param request CreateMasterSlaveServerGroupRequest
 * @return CreateMasterSlaveServerGroupResponse
 */
async function createMasterSlaveServerGroup(request: CreateMasterSlaveServerGroupRequest): CreateMasterSlaveServerGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMasterSlaveServerGroupWithOptions(request, runtime);
}

model CreateRulesRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend listener port that is used by the SLB instance.

Valid values: **1 to 65535**.

This parameter is required.', example='443'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the SLB instance.

> This parameter is required if the same port is used by listeners that use different protocols.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp1ca0zt07t934w******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleList?: string(name='RuleList', description='The forwarding rules that you want to create. You can create up to 10 forwarding rules in each request. Each forwarding rule contains the following parameters:

*   **RuleName**: Required. The value must be of the STRING type. The name of the forwarding rule. The name must be 1 to 40 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). Forwarding rule names must be unique within the same listener.
*   **Domain**: Optional. The value must be of the STRING type. The domain name that is associated with the forwarding rule. You must specify at least one of this parameter and **Url**.
*   **Url**: Optional. The value must be of the STRING type. The URL must be 1 to 80 characters in length and can contain only letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URL cannot be a forward slash (/). However, the URL must start with a forward slash (/). You must specify at least one of this parameter and **Domain**.
*   **VServerGroupId**: Required. The value must be of the STRING type. The ID of the vServer group that is associated with the forwarding rule.

> You must specify at least one of `Domain` and `Url`. The combination of `Domain` and `Url` must be unique within the same listener.

This parameter is required.', example='[{"RuleName":"Rule2","Domain":"test.com","VServerGroupId":"rsp-bp114ni******"}]'),
}

model CreateRulesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  rules?: {
    rule?: [ 
    {
      ruleId?: string(name='RuleId', description='The forwarding rule ID.', example='rule-bp12jzy0*****'),
      ruleName?: string(name='RuleName', description='The name of the forwarding rule.', example='Rule2'),
    }
  ](name='Rule')
  }(name='Rules', description='The forwarding rules.'),
}

model CreateRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRulesResponseBody(name='body'),
}

/**
 * @summary Creates forwarding rules for an HTTP or HTTPS listener.
 *
 * @param request CreateRulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRulesResponse
 */
async function createRulesWithOptions(request: CreateRulesRequest, runtime: Util.RuntimeOptions): CreateRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.ruleList)) {
    query['RuleList'] = request.ruleList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateRules',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates forwarding rules for an HTTP or HTTPS listener.
 *
 * @param request CreateRulesRequest
 * @return CreateRulesResponse
 */
async function createRules(request: CreateRulesRequest): CreateRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRulesWithOptions(request, runtime);
}

model CreateTLSCipherPolicyRequest {
  ciphers?: [ string ](name='Ciphers', description='The supported cipher suites, which are determined by the TLS protocol version. You can specify at most 32 cipher suites.

TLS 1.0 and TLS 1.1 support the following cipher suites:

*   **ECDHE-ECDSA-AES128-SHA**
*   **ECDHE-ECDSA-AES256-SHA**
*   **ECDHE-RSA-AES128-SHA**
*   **ECDHE-RSA-AES256-SHA**
*   **AES128-SHA**
*   **AES256-SHA**
*   **DES-CBC3-SHA**

TLS 1.2 supports the following cipher suites:

*   **ECDHE-ECDSA-AES128-SHA**
*   **ECDHE-ECDSA-AES256-SHA**
*   **ECDHE-RSA-AES128-SHA**
*   **ECDHE-RSA-AES256-SHA**
*   **AES128-SHA**
*   **AES256-SHA**
*   **DES-CBC3-SHA**
*   **ECDHE-ECDSA-AES128-GCM-SHA256**
*   **ECDHE-ECDSA-AES256-GCM-SHA384**
*   **ECDHE-ECDSA-AES128-SHA256**
*   **ECDHE-ECDSA-AES256-SHA384**
*   **ECDHE-RSA-AES128-GCM-SHA256**
*   **ECDHE-RSA-AES256-GCM-SHA384**
*   **ECDHE-RSA-AES128-SHA256**
*   **ECDHE-RSA-AES256-SHA384**
*   **AES128-GCM-SHA256**
*   **AES256-GCM-SHA384**
*   **AES128-SHA256**
*   **AES256-SHA256**

TLS 1.3 supports the following cipher suites:

*   **TLS_AES_128_GCM_SHA256**
*   **TLS_AES_256_GCM_SHA384**
*   **TLS_CHACHA20_POLY1305_SHA256**
*   **TLS_AES_128_CCM_SHA256**
*   **TLS_AES_128_CCM_8_SHA256**

This parameter is required.', example='AES256-SHA256'),
  name?: string(name='Name', description='The name of the TLS policy. The name must be 1 to 200 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-).

This parameter is required.', example='TLSPolicy-test'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  TLSVersions?: [ string ](name='TLSVersions', description='The version of the TLS protocol. Valid values: **TLSv1.0**, **TLSv1.1**, **TLSv1.2**, and **TLSv1.3**. You can specify at most four TLS versions.

This parameter is required.', example='TLSv1.0'),
}

model CreateTLSCipherPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='D7A8875F-373A-5F48-8484-25B07A61F2AF'),
  TLSCipherPolicyId?: string(name='TLSCipherPolicyId', description='The ID of the policy.', example='tls-bp14bb1e7dll4f****'),
}

model CreateTLSCipherPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTLSCipherPolicyResponseBody(name='body'),
}

/**
 * @summary Creates a Transport Layer Security (TLS) policy.
 *
 * @param request CreateTLSCipherPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTLSCipherPolicyResponse
 */
async function createTLSCipherPolicyWithOptions(request: CreateTLSCipherPolicyRequest, runtime: Util.RuntimeOptions): CreateTLSCipherPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ciphers)) {
    query['Ciphers'] = request.ciphers;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.TLSVersions)) {
    query['TLSVersions'] = request.TLSVersions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateTLSCipherPolicy',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a Transport Layer Security (TLS) policy.
 *
 * @param request CreateTLSCipherPolicyRequest
 * @return CreateTLSCipherPolicyResponse
 */
async function createTLSCipherPolicy(request: CreateTLSCipherPolicyRequest): CreateTLSCipherPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTLSCipherPolicyWithOptions(request, runtime);
}

model CreateVServerGroupRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers to be added.

The value of this parameter must be a STRING list in the JSON format. You can specify up to 20 elements in each request.

*   **ServerId**: Required. Specify the ID of an Elastic Compute Service (ECS) instance or an Elastic Network Interface (ENI). This parameter must be of the STRING type.

*   **Port**: Required. Specify the port that is used by the backend server. This parameter must be of the INTEGER type. Valid values: **1** to **65535**.

*   **Weight**: Required. Specify the weight of the backend server. This parameter must be of the INTEGER type. Valid values: **0** to **100**.

*   **Description**: Optional. Specify the description of the backend server. This parameter must be of the STRING type. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

*   **Type**: Specify the type of the backend server. This parameter must be of the STRING type. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **ServerIp**: The IP address of the ECS instance or ENI.

Examples:

*   ECS instance:`  [{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port": "80", "Description": "test-112" }]. `
*   ENI:`  [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }] `
*   ENI with multiple IP addresses:`  [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }] `', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112"  }, { "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112"  }]'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the Server Load Balancer (SLB) instance.

This parameter is required.', example='lb-bp1qjwo61pqz3ahl******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the SLB instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='资源的标签键。N的取值范围：**1~20**。一旦输入该值，则不允许为空字符串。

最多支持64个字符，不能以`aliyun`和`acs:`开头，不能包含`http://`或者`https://`。', example='TestKey'),
      value?: string(name='Value', description='资源的标签值。N的取值范围：**1~20**。一旦输入该值，可以为空字符串。
最多支持128个字符，不能以`aliyun`和`acs:`开头，不能包含`http://`或者`https://`。', example='TestValue'),
    }
  ](name='Tag', description='标签列表。'),
  VServerGroupName?: string(name='VServerGroupName', description='The name of the vServer group.

The name must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).', example='Group1'),
}

model CreateVServerGroupResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the vServer group.', example='backend server'),
      port?: int32(name='Port', description='The port that is used by the backend server.', example='70'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='vm-2****'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs**: an ECS instance. This is the default value.
*   **eni**: an ENI.', example='Type'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6******'),
}

model CreateVServerGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateVServerGroupResponseBody(name='body'),
}

/**
 * @summary Creates a vServer group and adds backend servers to the vServer group.
 *
 * @param request CreateVServerGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateVServerGroupResponse
 */
async function createVServerGroupWithOptions(request: CreateVServerGroupRequest, runtime: Util.RuntimeOptions): CreateVServerGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.VServerGroupName)) {
    query['VServerGroupName'] = request.VServerGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateVServerGroup',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates a vServer group and adds backend servers to the vServer group.
 *
 * @param request CreateVServerGroupRequest
 * @return CreateVServerGroupResponse
 */
async function createVServerGroup(request: CreateVServerGroupRequest): CreateVServerGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVServerGroupWithOptions(request, runtime);
}

model DeleteAccessControlListRequest {
  aclId?: string(name='AclId', description='The ACL ID.

This parameter is required.', example='acl-bp1l0kk4gxce43kz******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the ACL.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteAccessControlListResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='988CB45E-1643-48C0-87B4-928DDF77EA49'),
}

model DeleteAccessControlListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAccessControlListResponseBody(name='body'),
}

/**
 * @summary Deletes an access control list (ACL).
 *
 * @description You can delete an ACL only if it is not associated with a listener.
 *
 * @param request DeleteAccessControlListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAccessControlListResponse
 */
async function deleteAccessControlListWithOptions(request: DeleteAccessControlListRequest, runtime: Util.RuntimeOptions): DeleteAccessControlListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAccessControlList',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an access control list (ACL).
 *
 * @description You can delete an ACL only if it is not associated with a listener.
 *
 * @param request DeleteAccessControlListRequest
 * @return DeleteAccessControlListResponse
 */
async function deleteAccessControlList(request: DeleteAccessControlListRequest): DeleteAccessControlListResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAccessControlListWithOptions(request, runtime);
}

model DeleteAccessLogsDownloadAttributeRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-uf68ps3rekbljmdb0****'),
  logsDownloadAttributes?: string(name='LogsDownloadAttributes', description='The access log forwarding rule. Parameters:

*   **LogProject**: the name of the project of Log Service.
*   **LogStore**: the name of the Logstore of Log Service.
*   **LoadBalancerId**: the ID of the CLB instance.

This parameter is required.', example='[{"logProject":"my-project", "LogStore":"my-log-store", "LoadBalancerId":"lb-uf68ps3rekbljmdb0****"}]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags that are added to the CLB instance. The tags must be key-value pairs that are contained in a JSON dictionary.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
}

model DeleteAccessLogsDownloadAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9C****'),
}

model DeleteAccessLogsDownloadAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAccessLogsDownloadAttributeResponseBody(name='body'),
}

/**
 * @summary Deletes the access log of a Classic Load Balancer (CLB) instance.
 *
 * @param request DeleteAccessLogsDownloadAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAccessLogsDownloadAttributeResponse
 */
async function deleteAccessLogsDownloadAttributeWithOptions(request: DeleteAccessLogsDownloadAttributeRequest, runtime: Util.RuntimeOptions): DeleteAccessLogsDownloadAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.logsDownloadAttributes)) {
    query['LogsDownloadAttributes'] = request.logsDownloadAttributes;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAccessLogsDownloadAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes the access log of a Classic Load Balancer (CLB) instance.
 *
 * @param request DeleteAccessLogsDownloadAttributeRequest
 * @return DeleteAccessLogsDownloadAttributeResponse
 */
async function deleteAccessLogsDownloadAttribute(request: DeleteAccessLogsDownloadAttributeRequest): DeleteAccessLogsDownloadAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAccessLogsDownloadAttributeWithOptions(request, runtime);
}

model DeleteCACertificateRequest {
  CACertificateId?: string(name='CACertificateId', description='The CA certificate ID.

This parameter is required.', example='123157908xxxxxxx_15c73d77203_-986300114_-2110544xxx'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region of the CA certificates.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteCACertificateResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeleteCACertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteCACertificateResponseBody(name='body'),
}

/**
 * @summary Deletes a certificate authority (CA) certificate.
 *
 * @description You cannot delete a CA certificate that is in use.
 *
 * @param request DeleteCACertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteCACertificateResponse
 */
async function deleteCACertificateWithOptions(request: DeleteCACertificateRequest, runtime: Util.RuntimeOptions): DeleteCACertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.CACertificateId)) {
    query['CACertificateId'] = request.CACertificateId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCACertificate',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a certificate authority (CA) certificate.
 *
 * @description You cannot delete a CA certificate that is in use.
 *
 * @param request DeleteCACertificateRequest
 * @return DeleteCACertificateResponse
 */
async function deleteCACertificate(request: DeleteCACertificateRequest): DeleteCACertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCACertificateWithOptions(request, runtime);
}

model DeleteDomainExtensionRequest {
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional domain name that you want to delete.

This parameter is required.', example='de-bp1rp7ta191dv'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Server Load Balancer (SLB) instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteDomainExtensionResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='149A2470-F010-4437-BF68-343D5099C19D'),
}

model DeleteDomainExtensionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDomainExtensionResponseBody(name='body'),
}

/**
 * @summary Deletes an additional domain name.
 *
 * @param request DeleteDomainExtensionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDomainExtensionResponse
 */
async function deleteDomainExtensionWithOptions(request: DeleteDomainExtensionRequest, runtime: Util.RuntimeOptions): DeleteDomainExtensionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainExtensionId)) {
    query['DomainExtensionId'] = request.domainExtensionId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDomainExtension',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an additional domain name.
 *
 * @param request DeleteDomainExtensionRequest
 * @return DeleteDomainExtensionResponse
 */
async function deleteDomainExtension(request: DeleteDomainExtensionRequest): DeleteDomainExtensionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDomainExtensionWithOptions(request, runtime);
}

model DeleteLoadBalancerRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The SLB instance ID.

This parameter is required.', example='lb-bp1h66tp5uat8********'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the SLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteLoadBalancerResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeleteLoadBalancerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLoadBalancerResponseBody(name='body'),
}

/**
 * @summary Deletes a pay-as-you-go Server Load Balancer (SLB) instance.
 *
 * @description > The listeners and tags of the SLB instance are deleted along with the SLB instance.
 *
 * @param request DeleteLoadBalancerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLoadBalancerResponse
 */
async function deleteLoadBalancerWithOptions(request: DeleteLoadBalancerRequest, runtime: Util.RuntimeOptions): DeleteLoadBalancerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLoadBalancer',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a pay-as-you-go Server Load Balancer (SLB) instance.
 *
 * @description > The listeners and tags of the SLB instance are deleted along with the SLB instance.
 *
 * @param request DeleteLoadBalancerRequest
 * @return DeleteLoadBalancerResponse
 */
async function deleteLoadBalancer(request: DeleteLoadBalancerRequest): DeleteLoadBalancerResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLoadBalancerWithOptions(request, runtime);
}

model DeleteLoadBalancerListenerRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1 to 65535**.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.

>  This parameter is required if the same port is specified for listeners of different protocols.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

>  If the endpoint of the selected region is slb.aliyuncs.com, the **RegionId** parameter is required.

This parameter is required.', example='lb-bp13jaf5qli5xmgl1miup'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteLoadBalancerListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeleteLoadBalancerListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLoadBalancerListenerResponseBody(name='body'),
}

/**
 * @summary Deletes a listener.
 *
 * @description >  You can delete only listeners that are in the **stopped** or **running** state.
 *
 * @param request DeleteLoadBalancerListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLoadBalancerListenerResponse
 */
async function deleteLoadBalancerListenerWithOptions(request: DeleteLoadBalancerListenerRequest, runtime: Util.RuntimeOptions): DeleteLoadBalancerListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLoadBalancerListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a listener.
 *
 * @description >  You can delete only listeners that are in the **stopped** or **running** state.
 *
 * @param request DeleteLoadBalancerListenerRequest
 * @return DeleteLoadBalancerListenerResponse
 */
async function deleteLoadBalancerListener(request: DeleteLoadBalancerListenerRequest): DeleteLoadBalancerListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLoadBalancerListenerWithOptions(request, runtime);
}

model DeleteMasterSlaveServerGroupRequest {
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the active/standby server group to be deleted.

>  An active/standby server group in use cannot be deleted.

This parameter is required.', example='rsp-cige6j5e7p'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the associated Server Load Balancer (SLB) instance belongs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DeleteMasterSlaveServerGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
}

model DeleteMasterSlaveServerGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteMasterSlaveServerGroupResponseBody(name='body'),
}

/**
 * @summary Deletes an active/standby server group.
 *
 * @param request DeleteMasterSlaveServerGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteMasterSlaveServerGroupResponse
 */
async function deleteMasterSlaveServerGroupWithOptions(request: DeleteMasterSlaveServerGroupRequest, runtime: Util.RuntimeOptions): DeleteMasterSlaveServerGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMasterSlaveServerGroup',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes an active/standby server group.
 *
 * @param request DeleteMasterSlaveServerGroupRequest
 * @return DeleteMasterSlaveServerGroupResponse
 */
async function deleteMasterSlaveServerGroup(request: DeleteMasterSlaveServerGroupRequest): DeleteMasterSlaveServerGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMasterSlaveServerGroupWithOptions(request, runtime);
}

model DeleteRulesRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query region IDs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleIds?: string(name='RuleIds', description='The list of forwarding rules that you want to delete.

>  The RuleIds parameter is required. You can specify up to 10 forwarding rules in each request.

This parameter is required.', example='["rule-bp1z9ce******","rule-bp1tuc******4"]'),
}

model DeleteRulesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
}

model DeleteRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRulesResponseBody(name='body'),
}

/**
 * @summary Deletes forwarding rules.
 *
 * @description ## Limits
 * The RuleIds parameter is required. You can specify up to 10 forwarding rules in each request.
 *
 * @param request DeleteRulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRulesResponse
 */
async function deleteRulesWithOptions(request: DeleteRulesRequest, runtime: Util.RuntimeOptions): DeleteRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.ruleIds)) {
    query['RuleIds'] = request.ruleIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRules',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes forwarding rules.
 *
 * @description ## Limits
 * The RuleIds parameter is required. You can specify up to 10 forwarding rules in each request.
 *
 * @param request DeleteRulesRequest
 * @return DeleteRulesResponse
 */
async function deleteRules(request: DeleteRulesRequest): DeleteRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRulesWithOptions(request, runtime);
}

model DeleteServerCertificateRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the Server Load Balancer (SLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query region IDs.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.

This parameter is required.', example='123157xxxxxxx_166f8204689_1714763408_709981430'),
}

model DeleteServerCertificateResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeleteServerCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteServerCertificateResponseBody(name='body'),
}

/**
 * @summary Deletes a server certificate.
 *
 * @description >  You cannot delete server certificates that are in use.
 *
 * @param request DeleteServerCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteServerCertificateResponse
 */
async function deleteServerCertificateWithOptions(request: DeleteServerCertificateRequest, runtime: Util.RuntimeOptions): DeleteServerCertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteServerCertificate',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a server certificate.
 *
 * @description >  You cannot delete server certificates that are in use.
 *
 * @param request DeleteServerCertificateRequest
 * @return DeleteServerCertificateResponse
 */
async function deleteServerCertificate(request: DeleteServerCertificateRequest): DeleteServerCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteServerCertificateWithOptions(request, runtime);
}

model DeleteTLSCipherPolicyRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  TLSCipherPolicyId?: string(name='TLSCipherPolicyId', description='The ID of the TLS policy.

This parameter is required.', example='tls-bp1lp2076qx4ebridp******'),
}

model DeleteTLSCipherPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model DeleteTLSCipherPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTLSCipherPolicyResponseBody(name='body'),
}

/**
 * @summary Deletes a TLS policy.
 *
 * @description ## Debugging
 * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Slb\\&api=DeleteTLSCipherPolicy\\&type=RPC\\&version=2014-05-15)
 *
 * @param request DeleteTLSCipherPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTLSCipherPolicyResponse
 */
async function deleteTLSCipherPolicyWithOptions(request: DeleteTLSCipherPolicyRequest, runtime: Util.RuntimeOptions): DeleteTLSCipherPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.TLSCipherPolicyId)) {
    query['TLSCipherPolicyId'] = request.TLSCipherPolicyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteTLSCipherPolicy',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a TLS policy.
 *
 * @description ## Debugging
 * [OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.](https://api.aliyun.com/#product=Slb\\&api=DeleteTLSCipherPolicy\\&type=RPC\\&version=2014-05-15)
 *
 * @param request DeleteTLSCipherPolicyRequest
 * @return DeleteTLSCipherPolicyResponse
 */
async function deleteTLSCipherPolicy(request: DeleteTLSCipherPolicyRequest): DeleteTLSCipherPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteTLSCipherPolicyWithOptions(request, runtime);
}

model DeleteVServerGroupRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the associated Server Load Balancer (SLB) instance belongs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the VServer group to be deleted.

>  If the VServer group is in use, it cannot be deleted.

This parameter is required.', example='rsp-cige6j*****'),
}

model DeleteVServerGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
}

model DeleteVServerGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteVServerGroupResponseBody(name='body'),
}

/**
 * @summary Deletes a VServer group.
 *
 * @param request DeleteVServerGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteVServerGroupResponse
 */
async function deleteVServerGroupWithOptions(request: DeleteVServerGroupRequest, runtime: Util.RuntimeOptions): DeleteVServerGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVServerGroup',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Deletes a VServer group.
 *
 * @param request DeleteVServerGroupRequest
 * @return DeleteVServerGroupResponse
 */
async function deleteVServerGroup(request: DeleteVServerGroupRequest): DeleteVServerGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVServerGroupWithOptions(request, runtime);
}

model DescribeAccessControlListAttributeRequest {
  aclEntryComment?: string(name='AclEntryComment', description='The remarks of the ACL entry.

It must be 2 to 100 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.', example='test'),
  aclId?: string(name='AclId', description='The ID of the ACL.

This parameter is required.', example='acl-bp1l0k********kzet04s'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  page?: int32(name='Page', description='The page number.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page. Maximum value: **50**. Default value: **10**.', example='10'),
  regionId?: string(name='RegionId', description='The time when the network ACL was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeAccessControlListAttributeResponseBody = {
  aclEntrys?: {
    aclEntry?: [ 
    {
      aclEntryComment?: string(name='AclEntryComment', description='The description of the ACL entry.', example='test'),
      aclEntryIP?: string(name='AclEntryIP', description='The IP address specified in the ACL entry.', example='192.168.0.1'),
    }
  ](name='AclEntry')
  }(name='AclEntrys', description='The IP entries that you want to remove from the network ACL. Valid values:

*   **entry**: the IP address or CIDR block that you want to remove from the network ACL. Separate multiple IP addresses or CIDR blocks with commas (,).
*   **comment**: the description of the network ACL.'),
  aclId?: string(name='AclId', description='The ID of the network ACL.', example='acl-bp1l0k********kzet04s'),
  aclName?: string(name='AclName', description='The ACL name. The name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of each ACL must be unique within a region. Fuzzy match is supported.', example='doctest'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  createTime?: string(name='CreateTime', description='The time when the ACL was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-08-31T02:49:05Z'),
  relatedListeners?: {
    relatedListener?: [ 
    {
      aclType?: string(name='AclType', description='The type of ACL. Valid values:

*   **black**
*   **white**', example='white'),
      listenerPort?: int32(name='ListenerPort', description='The frontend port of the listener with which the ACL is associated.', example='443'),
      loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp13j********1miup'),
      protocol?: string(name='Protocol', description='The type of protocol that the associated listener uses.', example='https'),
    }
  ](name='RelatedListener')
  }(name='RelatedListeners', description='The listeners that are associated with the network ACL.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='C9906A1D-86F7-4C9C-A369-54DA42EF206A'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-******************'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  totalAclEntry?: int32(name='TotalAclEntry', description='The total number of access control entries.', example='200'),
}

model DescribeAccessControlListAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccessControlListAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configuration of an access control list (ACL).
 *
 * @param request DescribeAccessControlListAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccessControlListAttributeResponse
 */
async function describeAccessControlListAttributeWithOptions(request: DescribeAccessControlListAttributeRequest, runtime: Util.RuntimeOptions): DescribeAccessControlListAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclEntryComment)) {
    query['AclEntryComment'] = request.aclEntryComment;
  }
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.page)) {
    query['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccessControlListAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configuration of an access control list (ACL).
 *
 * @param request DescribeAccessControlListAttributeRequest
 * @return DescribeAccessControlListAttributeResponse
 */
async function describeAccessControlListAttribute(request: DescribeAccessControlListAttributeRequest): DescribeAccessControlListAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccessControlListAttributeWithOptions(request, runtime);
}

model DescribeAccessControlListsRequest {
  aclName?: string(name='AclName', description='The ACL name. The ACL name. The name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of each ACL must be unique within a region. Fuzzy match is supported.', example='rule1'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version of the Classic Load Balancer (CLB) instance with which the ACL is associated. Valid values:

*   **ipv4**
*   **ipv6**', example='ipv4'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Default value: **1**.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Maximum value: **50**. Default value: **10**.', example='10'),
  regionId?: string(name='RegionId', description='The region ID of the ACL.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rtop4****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='test'),
      value?: string(name='Value', description='The tag value. You can specify at most 20 tag values. The tag value cannot be an empty string.

The tag value must be 1 to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='1'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeAccessControlListsResponseBody = {
  acls?: {
    acl?: [ 
    {
      aclId?: string(name='AclId', description='The ACL ID.', example='acl-bp1l0kk4gxce43k*****'),
      aclName?: string(name='AclName', description='The ACL name.', example='rule1'),
      addressIPVersion?: string(name='AddressIPVersion', description='The IP version that is used by the CLB instance associated with the ACL.', example='ipv4'),
      createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-08-31T02:49:05Z'),
      resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-jfenfbp1lhl0****'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='test'),
          tagValue?: string(name='TagValue', description='The tag value.', example='1'),
        }
      ](name='Tag')
      }(name='Tags', description='The list of tags added to the network ACL. The value of this parameter must be a STRING list in the JSON format.'),
    }
  ](name='Acl')
  }(name='Acls', description='A list of ACLs.'),
  count?: int32(name='Count', description='The number of ACLs on the current page.', example='1'),
  pageNumber?: int32(name='PageNumber', description='The number of the returned page. Pages start from page **1**. Default value: **1**.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on each page. Maximum value: **50**. Default value: **10**.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='3CB646EF-6147-4566-A9D9-CE8FBE86F971'),
  totalCount?: int32(name='TotalCount', description='The total number of ACLs.', example='1'),
}

model DescribeAccessControlListsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccessControlListsResponseBody(name='body'),
}

/**
 * @summary Queries access control lists (ACLs).
 *
 * @param request DescribeAccessControlListsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccessControlListsResponse
 */
async function describeAccessControlListsWithOptions(request: DescribeAccessControlListsRequest, runtime: Util.RuntimeOptions): DescribeAccessControlListsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccessControlLists',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries access control lists (ACLs).
 *
 * @param request DescribeAccessControlListsRequest
 * @return DescribeAccessControlListsResponse
 */
async function describeAccessControlLists(request: DescribeAccessControlListsRequest): DescribeAccessControlListsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccessControlListsWithOptions(request, runtime);
}

model DescribeAccessLogsDownloadAttributeRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp1b6c719dfa08ex*****'),
  logType?: string(name='LogType', description='The type of access log. Set the value to **layer7**, which specifies Layer 7 access logs.', example='layer7'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber', description='The page number. Default value: **1**.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Maximum value: **50**. Default value: **10**.', example='10'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags that are added to the CLB instance. The tags must be key-value pairs that are contained in a JSON dictionary.

You can specify up to 10 tags in each call.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
}

model DescribeAccessLogsDownloadAttributeResponseBody = {
  logsDownloadAttributes?: {
    logsDownloadAttribute?: [ 
    {
      loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp1b6c719dfa08ex*****'),
      logProject?: string(name='LogProject', description='The name of the Log Service project.', example='test-log-project'),
      logStore?: string(name='LogStore', description='The name of the Logstore.', example='test-log-store'),
      logType?: string(name='LogType', description='The type of access log. Only **layer7** is returned, which indicates Layer 7 access logs.', example='layer7'),
      region?: string(name='Region', description='The region ID of the CLB instance.', example='cn-hangzhou'),
    }
  ](name='LogsDownloadAttribute')
  }(name='LogsDownloadAttributes', description='The configuration of the access log.'),
  pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='10'),
}

model DescribeAccessLogsDownloadAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccessLogsDownloadAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the access log of a Classic Load Balancer (CLB) instance.
 *
 * @param request DescribeAccessLogsDownloadAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccessLogsDownloadAttributeResponse
 */
async function describeAccessLogsDownloadAttributeWithOptions(request: DescribeAccessLogsDownloadAttributeRequest, runtime: Util.RuntimeOptions): DescribeAccessLogsDownloadAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.logType)) {
    query['LogType'] = request.logType;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccessLogsDownloadAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the access log of a Classic Load Balancer (CLB) instance.
 *
 * @param request DescribeAccessLogsDownloadAttributeRequest
 * @return DescribeAccessLogsDownloadAttributeResponse
 */
async function describeAccessLogsDownloadAttribute(request: DescribeAccessLogsDownloadAttributeRequest): DescribeAccessLogsDownloadAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccessLogsDownloadAttributeWithOptions(request, runtime);
}

model DescribeAvailableResourceRequest {
  addressIPVersion?: string(name='AddressIPVersion', description='The type of the IP address.

Valid values: **ipv4 and ipv6**.', example='ipv4'),
  addressType?: string(name='AddressType', description='The network type.

Valid values: **vpc, classic-internet, and classic-intranet**.

vpc: an internal Classic Load Balancer (CLB) instance that is deployed in a virtual private cloud (VPC).

classic_internet: a public-facing CLB instance.

classic_intranet: an internal CLB instance that is deployed in a classic network.', example='vpc'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeAvailableResourceResponseBody = {
  availableResources?: {
    availableResource?: [ 
    {
      masterZoneId?: string(name='MasterZoneId', description='The primary zone.', example='cn-shanghai-a'),
      slaveZoneId?: string(name='SlaveZoneId', description='The secondary zone.', example='cn-shanghai-b'),
      supportResources?: {
        supportResource?: [ 
        {
          addressIPVersion?: string(name='AddressIPVersion', description='The type of the IP address.

Valid values: **ipv4 and ipv6**.', example='ipv4'),
          addressType?: string(name='AddressType', description='The network type.

Valid values: **vpc, classic-internet, and classic-intranet**.', example='classic_internet'),
        }
      ](name='SupportResource')
      }(name='SupportResources', description='The supported resources.'),
    }
  ](name='AvailableResource')
  }(name='AvailableResources', description='The zones and the supported resources.'),
  requestId?: string(name='RequestId', description='The request ID.', example='173B0EEA-22ED-4EE2-91F9-3A1CDDFFBBBA'),
}

model DescribeAvailableResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAvailableResourceResponseBody(name='body'),
}

/**
 * @summary Queries the available resources and resources that are available for purchase in the zones of a region.
 *
 * @description > Only the available resources and zones are returned.
 *
 * @param request DescribeAvailableResourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAvailableResourceResponse
 */
async function describeAvailableResourceWithOptions(request: DescribeAvailableResourceRequest, runtime: Util.RuntimeOptions): DescribeAvailableResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.addressType)) {
    query['AddressType'] = request.addressType;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAvailableResource',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the available resources and resources that are available for purchase in the zones of a region.
 *
 * @description > Only the available resources and zones are returned.
 *
 * @param request DescribeAvailableResourceRequest
 * @return DescribeAvailableResourceResponse
 */
async function describeAvailableResource(request: DescribeAvailableResourceRequest): DescribeAvailableResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAvailableResourceWithOptions(request, runtime);
}

model DescribeCACertificatesRequest {
  CACertificateId?: string(name='CACertificateId', description='The CA certificate ID.', example='139a00604bd-cn-east-hangzho****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region of the CA certificates.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rtop****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of tag N. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='test'),
      value?: string(name='Value', description='The value of tag N. Valid values of N: **1 to 20**. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='1'),
    }
  ](name='Tag', description='The tags of the CA certificates.'),
}

model DescribeCACertificatesResponseBody = {
  CACertificates?: {
    CACertificate?: [ 
    {
      CACertificateId?: string(name='CACertificateId', description='The CA certificate ID.', example='139a00604bd-cn-east-hangzho****'),
      CACertificateName?: string(name='CACertificateName', description='The CA certificate name.', example='test'),
      commonName?: string(name='CommonName', description='The domain name of the CA certificate.', example='www.example.com'),
      createTime?: string(name='CreateTime', description='The time when the CA certificate was created. The time is in the `YYYY-MM-DDThh:mm:ssZ` format.', example='2021-08-31T02:49:05Z'),
      createTimeStamp?: long(name='CreateTimeStamp', description='The timestamp when the CA certificate was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1504147745000'),
      expireTime?: string(name='ExpireTime', description='The time when the CA certificate expires. The time is in the `YYYY-MM-DDThh:mm:ssZ` format.', example='2024-11-21T06:04:25Z'),
      expireTimeStamp?: long(name='ExpireTimeStamp', description='The timestamp that indicates when the CA certificate expires. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.', example='1732169065000'),
      fingerprint?: string(name='Fingerprint', description='The fingerprint of the CA certificate.', example='79:43:fb:7d:a4:7f:44:32:61:16:57:17:e3:e8:b7:36:03:57:f6:89'),
      regionId?: string(name='RegionId', description='The region of the CA certificate.', example='cn-hangzhou'),
      resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rtop****'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='test'),
          tagValue?: string(name='TagValue', description='The tag value.', example='1'),
        }
      ](name='Tag')
      }(name='Tags', description='The tag.'),
    }
  ](name='CACertificate')
  }(name='CACertificates', description='The information about the CA certificate.'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model DescribeCACertificatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCACertificatesResponseBody(name='body'),
}

/**
 * @summary Queries certificate authority (CA) certificates.
 *
 * @description > To ensure data confidentiality, only the certificate fingerprint and name are returned. The certificate content is not returned.
 *
 * @param request DescribeCACertificatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCACertificatesResponse
 */
async function describeCACertificatesWithOptions(request: DescribeCACertificatesRequest, runtime: Util.RuntimeOptions): DescribeCACertificatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.CACertificateId)) {
    query['CACertificateId'] = request.CACertificateId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCACertificates',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries certificate authority (CA) certificates.
 *
 * @description > To ensure data confidentiality, only the certificate fingerprint and name are returned. The certificate content is not returned.
 *
 * @param request DescribeCACertificatesRequest
 * @return DescribeCACertificatesResponse
 */
async function describeCACertificates(request: DescribeCACertificatesRequest): DescribeCACertificatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCACertificatesWithOptions(request, runtime);
}

model DescribeDomainExtensionAttributeRequest {
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional certificate.

This parameter is required.', example='de-bp1rp7ta191dv'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeDomainExtensionAttributeResponseBody = {
  domain?: string(name='Domain', description='The domain name.', example='www.example.com'),
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional certificate.', example='de-bp1rp7ta191dv'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port of the HTTPS listener that is configured for the SLB instance. Valid values: **1** to **65535**.', example='443'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.', example='lb-bp1o94dp5i6*****earr9g6d1l'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='48C1B671-C6DB-4DDE-9B30-10557E36CDE0'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate that is used by the domain name.', example='231579085529123_166f82******_1714763408_709981430'),
}

model DescribeDomainExtensionAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDomainExtensionAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the attributes of an additional certificate.
 *
 * @param request DescribeDomainExtensionAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDomainExtensionAttributeResponse
 */
async function describeDomainExtensionAttributeWithOptions(request: DescribeDomainExtensionAttributeRequest, runtime: Util.RuntimeOptions): DescribeDomainExtensionAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainExtensionId)) {
    query['DomainExtensionId'] = request.domainExtensionId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDomainExtensionAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the attributes of an additional certificate.
 *
 * @param request DescribeDomainExtensionAttributeRequest
 * @return DescribeDomainExtensionAttributeResponse
 */
async function describeDomainExtensionAttribute(request: DescribeDomainExtensionAttributeRequest): DescribeDomainExtensionAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainExtensionAttributeWithOptions(request, runtime);
}

model DescribeDomainExtensionsRequest {
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional certificate.', example='de-bp1rp7ta1****'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port of the HTTPS listener that is configured for the Classic Load Balancer (CLB) instance. Valid values: **1 to 65535**.

This parameter is required.', example='443'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08ex****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeDomainExtensionsResponseBody = {
  domainExtensions?: {
    domainExtension?: [ 
    {
      domain?: string(name='Domain', description='The domain name.', example='www.example.com'),
      domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional certificate.', example='de-bp1rp7ta1****'),
      serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate that is used by the domain name.', example='1231579085529123_166f8204689_1714763408_70998****'),
    }
  ](name='DomainExtension')
  }(name='DomainExtensions', description='The list of additional certificates.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='48C1B671-C6DB-4DDE-9B30-10557E36CDE0'),
}

model DescribeDomainExtensionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDomainExtensionsResponseBody(name='body'),
}

/**
 * @summary Queries additional certificates.
 *
 * @param request DescribeDomainExtensionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDomainExtensionsResponse
 */
async function describeDomainExtensionsWithOptions(request: DescribeDomainExtensionsRequest, runtime: Util.RuntimeOptions): DescribeDomainExtensionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainExtensionId)) {
    query['DomainExtensionId'] = request.domainExtensionId;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDomainExtensions',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries additional certificates.
 *
 * @param request DescribeDomainExtensionsRequest
 * @return DescribeDomainExtensionsResponse
 */
async function describeDomainExtensions(request: DescribeDomainExtensionsRequest): DescribeDomainExtensionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainExtensionsWithOptions(request, runtime);
}

model DescribeHealthStatusRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1 to 65535**.

>  If you do not specify this parameter, the health status of all ports is returned.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the Classic Load Balancer (CLB) instance.

This parameter is required.', example='lb-bp1qjwo61pqz3ah****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeHealthStatusResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='80'),
      port?: int32(name='Port', description='The backend port that is used by the CLB instance.', example='70'),
      protocol?: string(name='Protocol', description='The frontend protocol that is used by the CLB instance.', example='https'),
      serverHealthStatus?: string(name='ServerHealthStatus', description='The health status of the backend server. Valid values:

*   **normal**: The backend server is healthy.
*   **abnormal**: The backend server is unhealthy.
*   **unavailable**: The health check is not complete.', example='abnormal'),
      serverId?: string(name='ServerId', description='The ID of the Elastic Compute Service (ECS) instance or elastic network interface (ENI).', example='i-bp1h5u3fv54ytf***'),
      serverIp?: string(name='ServerIp', description='The IP address of the ECS instance.', example='192.XX.XX.11'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model DescribeHealthStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHealthStatusResponseBody(name='body'),
}

/**
 * @summary Queries the health status of backend servers.
 *
 * @param request DescribeHealthStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHealthStatusResponse
 */
async function describeHealthStatusWithOptions(request: DescribeHealthStatusRequest, runtime: Util.RuntimeOptions): DescribeHealthStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHealthStatus',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the health status of backend servers.
 *
 * @param request DescribeHealthStatusRequest
 * @return DescribeHealthStatusResponse
 */
async function describeHealthStatus(request: DescribeHealthStatusRequest): DescribeHealthStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHealthStatusWithOptions(request, runtime);
}

model DescribeHighDefinationMonitorRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where you want to query the configuration of fine-grained monitoring.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags of the logs. The tags must be key-value pairs that are contained in a JSON dictionary.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
}

model DescribeHighDefinationMonitorResponseBody = {
  logProject?: string(name='LogProject', description='The name of the Log Service project.', example='my-project'),
  logStore?: string(name='LogStore', description='The name of the Logstore.', example='my-log-store'),
  requestId?: string(name='RequestId', description='The request ID.', example='2F398FF5-B349-5C01-8638-8E9A0BF1DBE6'),
  success?: string(name='Success', description='Indicates whether the call is successful. Valid values:

*   **true**
*   **false**', example='true'),
}

model DescribeHighDefinationMonitorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHighDefinationMonitorResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of fine-grained monitoring in a region.
 *
 * @param request DescribeHighDefinationMonitorRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeHighDefinationMonitorResponse
 */
async function describeHighDefinationMonitorWithOptions(request: DescribeHighDefinationMonitorRequest, runtime: Util.RuntimeOptions): DescribeHighDefinationMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHighDefinationMonitor',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of fine-grained monitoring in a region.
 *
 * @param request DescribeHighDefinationMonitorRequest
 * @return DescribeHighDefinationMonitorResponse
 */
async function describeHighDefinationMonitor(request: DescribeHighDefinationMonitorRequest): DescribeHighDefinationMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHighDefinationMonitorWithOptions(request, runtime);
}

model DescribeListenerAccessControlAttributeRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1 to 65535**.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.

> This parameter is required if the same port is specified for listeners of different protocols.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-8vb86hxixo8lvsja8****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the Classic Load Balancer (CLB) instance is created.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeListenerAccessControlAttributeResponseBody = {
  accessControlStatus?: string(name='AccessControlStatus', description='Indicates whether the whitelist is enabled. Valid values:

*   **open_white_list**: the whitelist is enabled.
*   **close**: the whitelist is disabled.', example='open_white_list'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  sourceItems?: string(name='SourceItems', description='The queried ACLs.', example='192.168.XX.XX'),
}

model DescribeListenerAccessControlAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeListenerAccessControlAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the whitelist configurations of a listener.
 *
 * @param request DescribeListenerAccessControlAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeListenerAccessControlAttributeResponse
 */
async function describeListenerAccessControlAttributeWithOptions(request: DescribeListenerAccessControlAttributeRequest, runtime: Util.RuntimeOptions): DescribeListenerAccessControlAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeListenerAccessControlAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the whitelist configurations of a listener.
 *
 * @param request DescribeListenerAccessControlAttributeRequest
 * @return DescribeListenerAccessControlAttributeResponse
 */
async function describeListenerAccessControlAttribute(request: DescribeListenerAccessControlAttributeRequest): DescribeListenerAccessControlAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeListenerAccessControlAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancerAttributeRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-bp1b6c719dfa08ex****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLoadBalancerAttributeResponseBody = {
  address?: string(name='Address', description='The service IP address of the CLB instance.', example='42.XX.XX.6'),
  addressIPVersion?: string(name='AddressIPVersion', description='The version of the IP address. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  addressType?: string(name='AddressType', description='The address type of the CLB instance.', example='internet'),
  autoReleaseTime?: long(name='AutoReleaseTime', description='The timestamp generated when the CLB instance is released.', example='1513947075000'),
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the backend server.

> This parameter is not returned if Description is not set.', example='backend server description'),
      serverId?: string(name='ServerId', description='The backend server ID.', example='i-2zej4lxhjoq1icu*****'),
      serverIp?: string(name='ServerIp', description='The ID of the elastic network interface (ENI) or elastic container instance.', example='192.XX.XX.11'),
      type?: string(name='Type', description='The type of the backend server.', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='90'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The backend servers of the CLB instance.'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the Internet-facing CLB instance that is billed on a pay-by-bandwidth basis.', example='5'),
  createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time is in the `YYYY-MM-DDThh:mm:ssZ` format.', example='2017-08-31T02:49:05Z'),
  createTimeStamp?: long(name='CreateTimeStamp', description='The timestamp generated when the CA certificate is uploaded.', example='1504147745000'),
  deleteProtection?: string(name='DeleteProtection', description='Indicates whether deletion protection is enabled for the CLB instance.

Valid values: **on** and **off**.', example='off'),
  endTime?: string(name='EndTime', description='The time when the CLB instance expires.', example='2022-09-08T16:00:00Z'),
  endTimeStamp?: long(name='EndTimeStamp', description='The timestamp that indicates the expiration time of the CLB instance.', example='32493801600000'),
  instanceChargeType?: string(name='InstanceChargeType', description='The metering method of the CLB instance. Valid values:

*   **PayBySpec** (default)
*   **PayByCLCU**

> This parameter is available only on the China site and takes effect only when **PayType** is set to **PayOnDemand**.', example='PayBySpec'),
  internetChargeType?: string(name='InternetChargeType', description='The metering method of the Internet-facing CLB instance. Valid values:

*   **paybytraffic**
*   **paybybandwidth**', example='paybytraffic'),
  listenerPorts?: {
    listenerPort?: [ int32 ](name='ListenerPort')
  }(name='ListenerPorts', description='The frontend port used by the CLB instance.'),
  listenerPortsAndProtocal?: {
    listenerPortAndProtocal?: [ 
    {
      listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='443'),
      listenerProtocal?: string(name='ListenerProtocal', description='The frontend protocol that is used by the CLB instance.', example='http'),
    }
  ](name='ListenerPortAndProtocal')
  }(name='ListenerPortsAndProtocal', description='The ports or protocols of the listeners.'),
  listenerPortsAndProtocol?: {
    listenerPortAndProtocol?: [ 
    {
      description?: string(name='Description', description='Indicates whether the listener is enabled.', example='Listener Description'),
      forwardPort?: int32(name='ForwardPort', description='The destination listening port to which requests are forwarded. The port must be open and use HTTPS.', example='443'),
      listenerForward?: string(name='ListenerForward', description='Indicates whether the listener is enabled.', example='on'),
      listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='80'),
      listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.', example='https'),
    }
  ](name='ListenerPortAndProtocol')
  }(name='ListenerPortsAndProtocol', description='The ports or protocols of the listeners.'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp1b6c719dfa08ex****'),
  loadBalancerName?: string(name='LoadBalancerName', description='The name of the CLB instance.', example='lb-instance-test'),
  loadBalancerSpec?: string(name='LoadBalancerSpec', description='The specification of the CLB instance.', example='slb.s1.small'),
  loadBalancerStatus?: string(name='LoadBalancerStatus', description='The status of the CLB instance. Valid values:

*   **inactive**: The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
*   **active**: The CLB instance is running as expected. Newly created CLB instances are in the **active** state by default.
*   **locked**: The CLB instance is locked. CLB instances may be locked due to overdue payments or other reasons.', example='active'),
  masterZoneId?: string(name='MasterZoneId', description='The ID of the primary zone to which the CLB instance belongs.', example='cn-hangzhou-b'),
  modificationProtectionReason?: string(name='ModificationProtectionReason', description='The reason why the configuration read-only mode is enabled. The value is 1 to 80 characters in length. It starts with a letter and can contain digits, periods (.), underscores (_), and hyphens (-).

>  This parameter is valid only when **ModificationProtectionStatus** is set to **ConsoleProtection**.', example='Managed instance'),
  modificationProtectionStatus?: string(name='ModificationProtectionStatus', description='Indicates whether the configuration read-only mode is enabled. Valid values:

*   **NonProtection**: The configuration read-only mode is disabled. After you disable the configuration read-only mode, the value of **ModificationProtectionReason** is cleared.
*   **ConsoleProtection**: The configuration read-only mode is enabled.

>  If this parameter is set to **ConsoleProtection**, you cannot modify instance configurations in the CLB console. However, you can modify instance configurations by calling API operations.', example='ConsoleProtection'),
  networkType?: string(name='NetworkType', description='The network type of the CLB instance.', example='vpc'),
  payType?: string(name='PayType', description='The billing method of the CLB instance. Valid values:

*   Only **PayOnDemand** may be returned, which indicates the pay-as-you-go billing method.', example='PayOnDemand'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.', example='cn-hangzhou'),
  regionIdAlias?: string(name='RegionIdAlias', description='The alias of the region to which the CLB instance belongs.', example='hangzhou'),
  renewalCycUnit?: string(name='RenewalCycUnit', description='The auto-renewal cycle. Valid values: **Year** and **Month**. Default value: Month.

>  This parameter is valid only if you create a subscription CLB instance on the Alibaba Cloud China site. In this case, **PayType** must be set to **PrePay** and **RenewalStatus** must be set to **AutoRenewal**.', example='Month'),
  renewalDuration?: int32(name='RenewalDuration', description='The auto-renewal duration. This parameter is valid only if **RenewalStatus** is set to **AutoRenewal**.

*   Valid values when **PeriodUnit** is set to **Year**: **1**, **2**, and **3**.

*   Valid values when **PeriodUnit** is set to **Month**: **1**, **2**, **3**, and **6**.

> This parameter is valid only when you create a subscription CLB instance on the Alibaba Cloud China site. In this case, the **PayType** parameter must be set to **PrePay**.', example='1'),
  renewalStatus?: string(name='RenewalStatus', description='Indicates whether auto-renewal is enabled. Valid values:

*   **AutoRenewal**: Auto-renewal is enabled.

*   **Normal**: Auto-renewal is disabled. You must manually renew the CLB instance.

*   **NotRenewal**: The CLB instance will not be renewed upon expiration. If this value is returned, the system does not send notifications until three days before the expiration date.

    **

    **Note** This parameter is valid only when you create a subscription CLB instance on the Alibaba Cloud China site. In this case, **PayType** must be set to **PrePay**.', example='AutoRenewal'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rtop****'),
  slaveZoneId?: string(name='SlaveZoneId', description='The ID of the secondary zone to which the CLB instance belongs.', example='cn-hangzhou-d'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key. Valid values of N: **1** to **20**. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain `http://` or `https://`. It must not start with `aliyun` or `acs:`.', example='test'),
      tagValue?: string(name='TagValue', description='The tag value. Valid values of N: **1** to **20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='value'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the internal-facing CLB instance belongs.', example='vsw-255ecrwq5****'),
  vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) where the internal-facing CLB instance is deployed.', example='vpc-25dvzy9f8****'),
}

model DescribeLoadBalancerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the detail of a Classic Load Balancer (CLB) instance.
 *
 * @description >  If backend servers are deployed in a vServer group, you can call the [DescribeVServerGroupAttribute](https://help.aliyun.com/document_detail/35224.html) operation to query the backend servers.
 *
 * @param request DescribeLoadBalancerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerAttributeResponse
 */
async function describeLoadBalancerAttributeWithOptions(request: DescribeLoadBalancerAttributeRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the detail of a Classic Load Balancer (CLB) instance.
 *
 * @description >  If backend servers are deployed in a vServer group, you can call the [DescribeVServerGroupAttribute](https://help.aliyun.com/document_detail/35224.html) operation to query the backend servers.
 *
 * @param request DescribeLoadBalancerAttributeRequest
 * @return DescribeLoadBalancerAttributeResponse
 */
async function describeLoadBalancerAttribute(request: DescribeLoadBalancerAttributeRequest): DescribeLoadBalancerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancerHTTPListenerAttributeRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-bp1uaunez0uho0zf0****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLoadBalancerHTTPListenerAttributeResponseBody = {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with a listener.

> This parameter is returned when **AclStatus** is set to **on**.', example='on'),
  aclIds?: {
    aclId?: [ string ](name='AclId')
  }(name='AclIds'),
  aclStatus?: string(name='AclStatus', description='Indicates whether access control is enabled. Valid values:

*   **on**
*   **off**', example='off'),
  aclType?: string(name='AclType', description='The type of the ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. If a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

> This parameter is required when **AclStatus** is set to **on**.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port that is used by the CLB instance.', example='80'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s.

*   **-1**: If -1 is returned, it indicates that the bandwidth of the listener is unlimited.
*   **1 to 5120**: If a value from 1 to 5120 is returned, the value indicates the maximum bandwidth of the listener. The sum of the maximum bandwidth of all listeners added to a CLB instance does not exceed the maximum bandwidth of the CLB instance.', example='-1'),
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.', example='B490B5EBF6F3CD402E515D22BCDA1598'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds.', example='500'),
  description?: string(name='Description', description='The name of the listener.', example='test'),
  forwardPort?: int32(name='ForwardPort', description='The listener port that is used to redirect HTTP requests to HTTPS.

>  If the **ListenerForward** parameter is set to **off**, this parameter is not displayed.', example='80'),
  gzip?: string(name='Gzip', description='Indicates whether `Gzip` compression is enabled to compress specific types of files. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

> This parameter takes effect only when **HealthCheck** is set to **on**.', example='8080'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that you want to use for health checks.', example='www.domain.com'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check.', example='http_2xx,http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed. Unit: seconds.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method used by HTTP listeners. Valid values: **head** and **get**.

> This parameter is returned when **HealthCheck** is set to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of each health check. Unit: seconds.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URL path that is used for health checks.

The URI must be 1 to 80 characters in length, and can contain only digits, letters, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/).', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The healthy threshold.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds.

Default value: **15**. Valid values: **1 to 60**.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='2'),
  listenerForward?: string(name='ListenerForward', description='Indicates whether HTTP-to-HTTPS redirection is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp1uaunez0uho0zf0****'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Unit: seconds.

Default value: **60**. Valid values: **1 to 180**.

If no response is received from a backend server within the specified timeout period, CLB returns the HTTP 504 status code to the client.', example='34'),
  rules?: {
    rule?: [ 
    {
      domain?: string(name='Domain', description='The domain name.', example='www.example.com'),
      ruleId?: string(name='RuleId', description='The ID of the forwarding rule.', example='1234'),
      ruleName?: string(name='RuleName', description='The name of the forwarding rule.', example='test'),
      url?: string(name='Url', description='The request URL.', example='/example'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group specified in the forwarding rule.', example='123'),
    }
  ](name='Rule')
  }(name='Rules', description='The list of forwarding rules.'),
  scheduler?: string(name='Scheduler', description='The routing algorithm. Valid values:

*   **wrr**: Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   \\\\*\\\\* rr\\\\*\\\\*: Requests are sequentially distributed to backend servers.', example='wrr'),
  securityStatus?: string(name='SecurityStatus', description='Indicates whether the listener is in the Secure state. Valid values:

*   **on**
*   **off**', example='on'),
  status?: string(name='Status', description='The status of the listener. Valid values:

*   **running**
*   **stopped**', example='stopped'),
  stickySession?: string(name='StickySession', description='Indicates whether session persistence is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie.

Valid values: **insert** and **server**.

*   **insert**: inserts a cookie.

    CLB inserts a session cookie (SERVERID) into the first HTTP or HTTPS response that is sent to a client. Subsequent requests to CLB carry this cookie, and CLB determines the destination servers of the requests based on the cookies.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener forwards this request to the recorded backend server.

> This parameter is required when **StickySession** is set to **on**.', example='insert'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The key of tag N. Valid values of N: **1** to **20**. The tag key cannot be an empty string. The tag key can be up to 64 characters in length. The key cannot start with `acs:` or `aliyun` or contain `http://` or `https://`.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The value of tag N. Valid values of N: **1** to **20**. The tag value can be an empty string. The tag value must be 0 to 128 characters in length, and cannot start with `acs:`. It cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The unhealthy threshold.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the associated server group.', example='rsp-cige6j****'),
  XForwardedFor?: string(name='XForwardedFor', description='Indicates whether the `X-Forwarded-For` header is used to preserve the real IP address of the client. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Indicates whether the `XForwardedFor_ClientSrcPort` header is used to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Indicates whether the `SLB-ID` header is used to retrieve the ID of the CLB instance. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Indicates whether the `SLB-IP` header is used to retrieve the virtual IP address requested by the client. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Indicates whether the `XForwardedFor_SLBPORT` header is used to retrieve the listener port of the CLB instance. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Indicates whether the `X-Forwarded-Proto` header is used to retrieve the listener protocol. Valid values:

*   **on**
*   **off**', example='on'),
}

model DescribeLoadBalancerHTTPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerHTTPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of an HTTP listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTP listener is created. For more information about how to create an HTTP listener, see [CreateLoadBalancerHTTPListener](https://help.aliyun.com/document_detail/27592.html).
 *
 * @param request DescribeLoadBalancerHTTPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerHTTPListenerAttributeResponse
 */
async function describeLoadBalancerHTTPListenerAttributeWithOptions(request: DescribeLoadBalancerHTTPListenerAttributeRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerHTTPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerHTTPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of an HTTP listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTP listener is created. For more information about how to create an HTTP listener, see [CreateLoadBalancerHTTPListener](https://help.aliyun.com/document_detail/27592.html).
 *
 * @param request DescribeLoadBalancerHTTPListenerAttributeRequest
 * @return DescribeLoadBalancerHTTPListenerAttributeResponse
 */
async function describeLoadBalancerHTTPListenerAttribute(request: DescribeLoadBalancerHTTPListenerAttributeRequest): DescribeLoadBalancerHTTPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerHTTPListenerAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancerHTTPSListenerAttributeRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-bp1mxu5r8lau****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLoadBalancerHTTPSListenerAttributeResponseBody = {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with a listener.

> This parameter is required when **AclStatus** is set to **on**.', example='nacl-a2do9e413e0spzasx****'),
  aclIds?: {
    aclId?: [ string ](name='AclId')
  }(name='AclIds'),
  aclStatus?: string(name='AclStatus', description='Indicates whether access control is enabled. Valid values:

*   **on**
*   **off**', example='off'),
  aclType?: string(name='AclType', description='The type of the access control list (ACL). Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. If a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

> This parameter is required when **AclStatus** is set to **on**.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port that is used by the CLB instance.', example='8080'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s.', example='-1'),
  CACertificateId?: string(name='CACertificateId', description='The ID of the certification authority (CA) certificate.', example='idkp-234-cn-test-0**'),
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.', example='B490B5EBF6F3CD402E515D22BCDA1598'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie.', example='500'),
  description?: string(name='Description', description='The name of the listener.', example='test'),
  domainExtensions?: {
    domainExtension?: [ 
    {
      domain?: string(name='Domain', description='The endpoint.', example='www.example.com'),
      domainExtensionId?: string(name='DomainExtensionId', description='The ID of the additional domain name.', example='12'),
      serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate that is associated with the domain name.', example='13344444****'),
    }
  ](name='DomainExtension')
  }(name='DomainExtensions', description='A list of additional certificates.'),
  enableHttp2?: string(name='EnableHttp2', description='Indicates whether `HTTP/2` is used. Valid values:

*   **on**
*   **off**', example='off'),
  gzip?: string(name='Gzip', description='Indicates whether `Gzip` compression is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

> This parameter is required when **HealthCheck** is set to **on**.', example='8080'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that you want to use for health checks.', example='www.test.com'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check.', example='http_2xx,http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed. Unit: seconds.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method used by HTTP listeners. Valid values: **head** and **get**.

> This parameter is available only when **HealthCheck** is set to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The maximum timeout period of a health check. Unit: seconds.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URL path that is used for health checks.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The healthy threshold.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Valid values: **1** to **60**. Default value: **15**. Unit: seconds.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='23'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.', example='lb-bp1mxu5r8lau****'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF3********'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Valid values: **1** to **180**. Default value: **60**. Unit: seconds.

If no response is received from a backend server within the specified timeout period, CLB returns the HTTP 504 status code to the client.', example='43'),
  rules?: {
    rule?: [ 
    {
      domain?: string(name='Domain', description='The endpoint.', example='www.example.com'),
      ruleId?: string(name='RuleId', description='The ID of the forwarding rule.', example='23'),
      ruleName?: string(name='RuleName', description='The name of the forwarding rule.', example='example'),
      url?: string(name='Url', description='The request path.', example='/example'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group that is associated with the forwarding rule.', example='12'),
    }
  ](name='Rule')
  }(name='Rules', description='The list of forwarding rules that are associated with the listener.'),
  scheduler?: string(name='Scheduler', description='The routing algorithm. Valid values: **wrr** and **rr**.

*   **wrr**: Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  securityStatus?: string(name='SecurityStatus', description='Indicates whether the listener is in the Secure state. Valid values:

*   **on**
*   **off**', example='on'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='idkp-123-cn-test-0**'),
  status?: string(name='Status', description='The status of the listener. Valid values:

*   **running**
*   **stopped**', example='stopped'),
  stickySession?: string(name='StickySession', description='Indicates whether session persistence is enabled. Valid values:

*   **on**
*   **off**', example='on'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie.

Valid values: **insert** and **server**.

*   **insert**: inserts a cookie.

    CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response packet that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener will distribute the request to the recorded backend server.', example='insert'),
  TLSCipherPolicy?: string(name='TLSCipherPolicy', description='The Transport Layer Security (TLS) security policy for a high-performance CLB instance.

Each security policy contains TLS protocol versions and cipher suites available for HTTPS. Valid values:

*   **tls_cipher_policy_1_0**:

    Supported TLS versions: TLS 1.0, TLS 1.1, and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_1**:

    Supported TLS versions: TLS 1.1 and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2_strict**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA

*   **tls_cipher_policy_1_2_strict_with_1_3**

    Supported TLS versions: TLS 1.2 and TLS 1.3

    Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA', example='tls_cipher_policy_1_0'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The key of tag N. Valid values of N: **1** to **20**. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with `aliyun` or `acs:`. The tag key cannot contain `http://` or `https://`.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The value of tag N. Valid values of N: **1** to **20**. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with `acs:`. The tag value cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The unhealthy threshold.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the associated server group.', example='rsp-cige6j5e********'),
  XForwardedFor?: string(name='XForwardedFor', description='Indicates whether the `X-Forwarded-For` header is used to retrieve client IP addresses. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_ClientCertClientVerify?: string(name='XForwardedFor_ClientCertClientVerify', description='Indicates whether the `XForwardedFor_ClientCertClientVerify` header is used to retrieve the verification result of the client certificate. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_ClientCertFingerprint?: string(name='XForwardedFor_ClientCertFingerprint', description='Indicates whether the `XForwardedFor_ClientCertFingerprint` header is used to retrieve the fingerprint of the client certificate. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_ClientCertIssuerDN?: string(name='XForwardedFor_ClientCertIssuerDN', description='Indicates whether the `XForwardedFor_ClientCertIssuerDN` header is used to retrieve information about the authority that issues the client certificate. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_ClientCertSubjectDN?: string(name='XForwardedFor_ClientCertSubjectDN', description='Indicates whether the `XForwardedFor_ClientCertSubjectDN` header is used to retrieve information about the owner of the client certificate. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Indicates whether the `XForwardedFor_ClientSrcPort` header is used to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Indicates whether the `SLB-ID` header is used to retrieve the ID of the ALB instance. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Indicates whether the `SLB-IP` header is used to retrieve the virtual IP address requested by the client. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Indicates whether the `XForwardedFor_SLBPORT` header is used to retrieve the listening port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Indicates whether the `X-Forwarded-Proto` header is used to retrieve the listener protocol. Valid values:

*   **on**
*   **off**', example='on'),
}

model DescribeLoadBalancerHTTPSListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerHTTPSListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of an HTTPS listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTPS listener is created. For more information about how to create an HTTPS listener, see [CreateLoadBalancerHTTPSListener](https://help.aliyun.com/document_detail/27593.html).
 *
 * @param request DescribeLoadBalancerHTTPSListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerHTTPSListenerAttributeResponse
 */
async function describeLoadBalancerHTTPSListenerAttributeWithOptions(request: DescribeLoadBalancerHTTPSListenerAttributeRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerHTTPSListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerHTTPSListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of an HTTPS listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTPS listener is created. For more information about how to create an HTTPS listener, see [CreateLoadBalancerHTTPSListener](https://help.aliyun.com/document_detail/27593.html).
 *
 * @param request DescribeLoadBalancerHTTPSListenerAttributeRequest
 * @return DescribeLoadBalancerHTTPSListenerAttributeResponse
 */
async function describeLoadBalancerHTTPSListenerAttribute(request: DescribeLoadBalancerHTTPSListenerAttributeRequest): DescribeLoadBalancerHTTPSListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerHTTPSListenerAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancerListenersRequest {
  description?: string(name='Description', description='The description of the listener.', example='HTTPS_443', nullable=true),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.', example='443', nullable=true),
  listenerProtocol?: string(name='ListenerProtocol', description='The protocol used by the listener. Valid values:

*   **tcp**
*   **udp**
*   **http**
*   **https**', example='http'),
  loadBalancerId?: [ string ](name='LoadBalancerId', description='The ID of the CLB instance. You can specify at most 10 IDs.', example='lb-123wrwer'),
  maxResults?: int32(name='MaxResults', description='The number of entries per page.

Valid values: **1** to **100**. If you do not specify this parameter, the default value **20** is used.', example='50'),
  nextToken?: string(name='NextToken', description='The token that is used for the next query. Valid values:

*   If this is your first query and no subsequent queries are to be sent, ignore this parameter.
*   If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](~~DescribeRegions~~) operation to query the most recent region list.

>  If the endpoint of the selected region is slb.aliyuncs.com, the `RegionId` parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='TestKey'),
      value?: string(name='Value', description='The tag value. Valid values of N: **1 to 20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeLoadBalancerListenersResponseBody = {
  listeners?: [ 
    {
      aclId?: string(name='AclId', description='The ID of the network ACL.', example='nacl-a2do9e413e0spzasx****'),
      aclIds?: [ string ](name='AclIds'),
      aclStatus?: string(name='AclStatus', description='Indicates whether access control is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
      aclType?: string(name='AclType', description='The type of the network access control list (ACL). Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

If you enable a whitelist but do not add an IP address to the whitelist, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are denied. A blacklist applies to scenarios in which you want to deny access from specific IP addresses.

If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.', example='white'),
      backendServerPort?: int32(name='BackendServerPort', description='The port of the backend server.

>  This parameter takes effect when the `VServerGroupId` parameter and the `MasterSlaveServerGroupId` parameter are empty.', example='80'),
      bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: If -1 is returned, it indicates that the bandwidth of the listener is unlimited.
*   **1 to 5120**: If a value from 1 to 5120 is returned, the value indicates the maximum bandwidth of the listener. The sum of the maximum bandwidth of all listeners added to a CLB instance does not exceed the maximum bandwidth of the CLB instance.', example='-1'),
      description?: string(name='Description', description='The description of the listener.', example='test'),
      HTTPListenerConfig?: {
        cookie?: string(name='Cookie', description='The cookie that is configured on the server.', example='B490B5EBF6F3CD402E515D22BCDA****'),
        cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds.

Valid values: **1** to **86400**.', example='500'),
        forwardPort?: int32(name='ForwardPort', description='The listening port that is used to redirect HTTP requests to HTTPS.

>  If the **ListenerForward** parameter is set to **off**, this parameter is not displayed.', example='80'),
        gzip?: string(name='Gzip', description='Indicates whether Gzip compression is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

>  This parameter takes effect when the **HealthCheck** parameter is set to **on**.', example='8080'),
        healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks.', example='www.example.com'),
        healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status codes that are used to determine whether the backend server passes the health check.', example='http_2xx,http_3xx'),
        healthCheckHttpVersion?: string(name='HealthCheckHttpVersion', description='The HTTP version that is used for health checks.', example='HTTP 1.0'),
        healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed. Unit: seconds.', example='5'),
        healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method. Valid values: **head** and **get**.', example='get'),
        healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The maximum timeout period of a health check. Unit: seconds.', example='3'),
        healthCheckType?: string(name='HealthCheckType', description='The protocol that is used for health checks.', example='tcp'),
        healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.', example='/test/index.html'),
        healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
        idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds. Valid values: **1** to **60**.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='15'),
        listenerForward?: string(name='ListenerForward', description='Indicates whether HTTP-to-HTTPS redirection is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Unit: seconds. Valid values: **1** to **180**.

If no response is received from a backend server during the request timeout period, CLB sends the `HTTP 504` status code to the client.', example='60'),
        stickySession?: string(name='StickySession', description='Indicates whether session persistence is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie. CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response that is sent to a client. The next request from the client contains this cookie, and the listener forwards this request to the recorded backend server.
*   **server**: rewrites a cookie. When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener will distribute the request to the recorded backend server.', example='insert'),
        unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
        XForwardedFor?: string(name='XForwardedFor', description='Indicates whether the `XForwardedFor` header is used to retrieve client IP addresses. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Indicates whether the `XForwardedFor_ClientSrcPort` header is used to retrieve the client port. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Indicates whether the `SLB-ID` header is used to retrieve the ID of the CLB instance. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Indicates whether the `SLB-IP` header is used to retrieve the virtual IP address requested by the client. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Indicates whether the `XForwardedFor_SLBPORT` header is used to retrieve the listening port. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Indicates whether the `X-Forwarded-Proto` header is used to retrieve the listening protocol. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
      }(name='HTTPListenerConfig', description='The configuration of the HTTP listener.'),
      HTTPSListenerConfig?: {
        CACertificateId?: string(name='CACertificateId', description='The ID of the certificate authority (CA) certificate.', example='idkp-234-cn-test-0****'),
        cookie?: string(name='Cookie', description='The cookie that is configured on the server.', example='B490B5EBF6F3CD402E515D22BCDA****'),
        cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds.

Valid values: **1** to **86400**.', example='500'),
        enableHttp2?: string(name='EnableHttp2', description='Indicates whether `HTTP 2.0` is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        gzip?: string(name='Gzip', description='Indicates whether Gzip compression is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.', example='8080'),
        healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks.', example='www.example.com'),
        healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status codes that are used to determine whether the backend server passes the health check.', example='http_2xx,http_3xx'),
        healthCheckHttpVersion?: string(name='HealthCheckHttpVersion', description='The HTTP version that is used for health checks.', example='HTTP 1.0'),
        healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed. Unit: seconds.', example='5'),
        healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method.', example='get'),
        healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The maximum timeout period of a health check. Unit: seconds.', example='3'),
        healthCheckType?: string(name='HealthCheckType', description='The protocol that is used for health checks.', example='tcp'),
        healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.', example='/test/index.html'),
        healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
        idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds. Valid values: **1** to **60**.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='15'),
        requestTimeout?: int32(name='RequestTimeout', description='The request timeout period. Unit: seconds. Valid values: **1** to **180**.

If no response is received from a backend server during the request timeout period, CLB sends the `HTTP 504` status code to the client.', example='60'),
        serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='idkp-123-cn-test-0****'),
        stickySession?: string(name='StickySession', description='Indicates whether session persistence is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie.

*   **insert**: inserts a cookie. CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response that is sent to a client. The next request from the client contains this cookie, and the listener forwards this request to the recorded backend server.
*   **server**: rewrites a cookie. When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener will distribute the request to the recorded backend server.', example='insert'),
        TLSCipherPolicy?: string(name='TLSCipherPolicy', description='The Transport Layer Security (TLS) security policy. Each security policy contains TLS protocol versions and cipher suites available for HTTPS.

*   **tls_cipher_policy_1_0**:

    Supported TLS versions: TLS 1.0, TLS 1.1, and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_1**:

    Supported TLS versions: TLS 1.1 and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2_strict**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA

*   **tls_cipher_policy_1_2_strict_with_1_3**

    Supported TLS versions: TLS 1.2 and TLS 1.3

    Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA', example='tls_cipher_policy_1_0'),
        unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
        XForwardedFor?: string(name='XForwardedFor', description='Indicates whether the `XForwardedFor` header is used to retrieve client IP addresses. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_ClientCertClientVerify?: string(name='XForwardedFor_ClientCertClientVerify', description='Indicates whether the `XForwardedFor_ClientCertClientVerify` header is used to retrieve the verification result of the client certificate. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_ClientCertFingerprint?: string(name='XForwardedFor_ClientCertFingerprint', description='Indicates whether the `XForwardedFor_ClientCertFingerprint` header is used to retrieve the fingerprint of the client certificate. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_ClientCertIssuerDN?: string(name='XForwardedFor_ClientCertIssuerDN', description='Indicates whether the `XForwardedFor_ClientCertIssuerDN` header is used to retrieve information about the authority that issues the client certificate. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_ClientCertSubjectDN?: string(name='XForwardedFor_ClientCertSubjectDN', description='Indicates whether the `XForwardedFor_ClientCertSubjectDN` header is used to retrieve information about the owner of the client certificate. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Indicates whether the `XForwardedFor_ClientSrcPort` header is used to retrieve the client port. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Indicates whether the `SLB-ID` header is used to retrieve the ID of the CLB instance. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Indicates whether the `SLB-IP` header is used to retrieve the virtual IP address requested by the client. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Indicates whether the `XForwardedFor_SLBPORT` header is used to retrieve the listening port. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Indicates whether the `X-Forwarded-Proto` header is used to retrieve the listening protocol. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
      }(name='HTTPSListenerConfig', description='The configuration of the HTTPS listener.'),
      listenerPort?: int32(name='ListenerPort', description='The listening port.', example='80'),
      listenerProtocol?: string(name='ListenerProtocol', description='The protocol used by the listener.', example='http'),
      loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1b6c719dfa****'),
      scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers with higher weights receive more requests than those with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
      status?: string(name='Status', description='The status of the listener. Valid values:

*   **running**: The listener runs as expected.
*   **stopped**: The listener is disabled.', example='running'),
      TCPListenerConfig?: {
        connectionDrain?: string(name='ConnectionDrain', description='Indicates whether connection draining is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        connectionDrainTimeout?: int32(name='ConnectionDrainTimeout', description='The timeout period of connection draining. Unit: seconds.

Value values: **10 to 900**.', example='300'),
        establishedTimeout?: int32(name='EstablishedTimeout', description='The timeout period of a connection. Unit: seconds.', example='500'),
        healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.', example='8080'),
        healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period of health checks. Unit: seconds.

Valid values: **1** to **300**.', example='100'),
        healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks.', example='www.example.com'),
        healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status codes that are used to determine whether the backend server passes the health check.', example='http_2xx,http_3xx'),
        healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.', example='5'),
        healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method.', example='get'),
        healthCheckType?: string(name='HealthCheckType', description='The protocol that is used for health checks.', example='tcp'),
        healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.', example='/test/index.html'),
        healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
        masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group that is associated with the listener.', example='rsp-0bfucw*****'),
        persistenceTimeout?: int32(name='PersistenceTimeout', description='Indicates whether session persistence is enabled. Unit: seconds.

Valid values: **0** to **3600**.

**0** indicates that session persistence is disabled.', example='0'),
        proxyProtocolV2Enabled?: string(name='ProxyProtocolV2Enabled', description='Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false**: no', example='false'),
        unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
      }(name='TCPListenerConfig', description='The configuration of the TCP listener.'),
      tags?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='TestKey'),
          tagValue?: string(name='TagValue', description='The tag value.

For more information about how to obtain a tag value, see [DescribeTagKeyList](https://help.aliyun.com/document_detail/145557.html).', example='TestValue'),
        }
      ](name='Tags', description='The tags.'),
      UDPListenerConfig?: {
        connectionDrain?: string(name='ConnectionDrain', description='Indicates whether connection draining is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
        connectionDrainTimeout?: int32(name='ConnectionDrainTimeout', description='The timeout period of connection draining. Unit: seconds.

Value values: **10 to 900**.', example='300'),
        healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
        healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.', example='8080'),
        healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period for a health check response.', example='100'),
        healthCheckExp?: string(name='HealthCheckExp', description='The response string for UDP listener health checks.', example='ok'),
        healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.', example='5'),
        healthCheckReq?: string(name='HealthCheckReq', description='The request string for UDP listener health checks.', example='hello'),
        healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that a backend server must consecutively pass health checks before it is declared healthy.', example='4'),
        masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group that is associated with the listener.', example='rsp-0bfucw****'),
        proxyProtocolV2Enabled?: string(name='ProxyProtocolV2Enabled', description='Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false**: no', example='false'),
        unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a backend server must consecutively fail health checks before it is declared unhealthy.', example='4'),
      }(name='UDPListenerConfig', description='The configuration of the UDP listener.'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group that is associated with the listener.', example='rsp-cige6j****'),
    }
  ](name='Listeners', description='The list of listeners on the CLB instance.

>  This parameter is not returned if no listener is created on the CLB instance.'),
  maxResults?: int32(name='MaxResults', description='The number of entries returned per page.', example='50'),
  nextToken?: string(name='NextToken', description='The token that determines the start point of the query. Valid values:

*   If **NextToken** is empty, it indicates that no subsequent query is to be sent.
*   If a value is returned for **NextToken**, the value is the token that determines the start point of the next query.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='10'),
}

model DescribeLoadBalancerListenersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerListenersResponseBody(name='body'),
}

/**
 * @summary Queries the listeners of a Classic Load Balancer (CLB) instance.
 *
 * @description *   A CLB instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/2401685.html).
 * *   One or more listeners are added to the CLB instance. For more information, see the following topics:
 *     *   [CreateLoadBalancerUDPListener](~~CreateLoadBalancerUDPListener~~)
 *     *   [CreateLoadBalancerTCPListener](~~CreateLoadBalancerTCPListener~~)
 *     *   [CreateLoadBalancerHTTPListener](~~CreateLoadBalancerHTTPListener~~)
 *     *   [CreateLoadBalancerHTTPSListener](~~CreateLoadBalancerHTTPSListener~~)
 *
 * @param request DescribeLoadBalancerListenersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerListenersResponse
 */
async function describeLoadBalancerListenersWithOptions(request: DescribeLoadBalancerListenersRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerListenersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerListeners',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the listeners of a Classic Load Balancer (CLB) instance.
 *
 * @description *   A CLB instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/2401685.html).
 * *   One or more listeners are added to the CLB instance. For more information, see the following topics:
 *     *   [CreateLoadBalancerUDPListener](~~CreateLoadBalancerUDPListener~~)
 *     *   [CreateLoadBalancerTCPListener](~~CreateLoadBalancerTCPListener~~)
 *     *   [CreateLoadBalancerHTTPListener](~~CreateLoadBalancerHTTPListener~~)
 *     *   [CreateLoadBalancerHTTPSListener](~~CreateLoadBalancerHTTPSListener~~)
 *
 * @param request DescribeLoadBalancerListenersRequest
 * @return DescribeLoadBalancerListenersResponse
 */
async function describeLoadBalancerListeners(request: DescribeLoadBalancerListenersRequest): DescribeLoadBalancerListenersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerListenersWithOptions(request, runtime);
}

model DescribeLoadBalancerTCPListenerAttributeRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1ygod3yctvg1y****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLoadBalancerTCPListenerAttributeResponseBody = {
  aclId?: string(name='AclId', description='The ID of the network ACL that is associated with the listener.

If **AclStatus** is set to **on**, this parameter is returned.', example='12'),
  aclIds?: {
    aclId?: [ string ](name='AclId')
  }(name='AclIds'),
  aclStatus?: string(name='AclStatus', description='Indicates whether access control is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  aclType?: string(name='AclType', description='The type of the ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specific IP addresses to access an application.

    Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are rejected. Blacklists apply to scenarios in which you want to block access from specified IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is returned.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port used by the CLB instance.

>  If the listener is associated with a vServer group, this parameter is not returned.', example='443'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, this parameter is set to -1. This indicates that the bandwidth of the listener is unlimited.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='-1'),
  connectionDrain?: string(name='ConnectionDrain', description='Indicates whether connection draining is enabled. If **ConnectionDrain** is set to **on**, the parameter is returned. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  connectionDrainTimeout?: int32(name='ConnectionDrainTimeout', description='The timeout period of connection draining. If **ConnectionDrain** is set to **on**, the parameter is returned.

Valid values: 10 to 900. Unit: seconds.', example='300'),
  description?: string(name='Description', description='The description of the listener.', example='TCP listener'),
  establishedTimeout?: int32(name='EstablishedTimeout', description='The timeout period of a connection.', example='500'),
  healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks. Valid values: **1** to **65535**. If this parameter is not set, the port specified by BackendServerPort is used for health checks.', example='8080'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period.', example='100'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP addresses of backend servers. If you do not set the HealthCheckDomain parameter or set the parameter to $_ip, the CLB instance uses the private IP address of each backend server for health checks.
*   **domain**: The domain name is 1 to 80 characters in length, and can contain letters, digits, periods (.), and hyphens (-).', example='www.domain.com'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check.', example='http_2xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Valid values: **1** to **50**. Unit: seconds.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method.', example='tcp'),
  healthCheckType?: string(name='HealthCheckType', description='The health check method that is used by the TCP listener.

Valid values: **tcp** and **http**.', example='tcp'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URL that is used for health checks. The URL must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URL is not a single forward slash (/) but it starts with a forward slash (/).', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The healthy threshold. The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**. Valid values: **2** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.', example='110'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1ygod3yctvg1y****'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group that is associated with the listener.', example='rsp-0bfucw****'),
  persistenceTimeout?: int32(name='PersistenceTimeout', description='The timeout period of session persistence.

Valid values: **0** to **3600**. Unit: seconds. Default value: **0**. If the default value is used, the system disables session persistence.', example='0'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false**: no', example='false'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm.

*   **wrr** (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  status?: string(name='Status', description='The status of the listener. Valid values:

*   **running**
*   **stopped**', example='stopped'),
  synProxy?: string(name='SynProxy', description='Indicates whether the SynProxy feature of CLB is enabled for protection.

We recommend that you use the default value of this parameter. Valid values:

*   **enable**: yes
*   **disable**: no', example='enable'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tags.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The unhealthy threshold. The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**. Valid values: **2** to **10**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the associated server group.', example='rsp-cige6******8'),
}

model DescribeLoadBalancerTCPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerTCPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of a TCP listener of Classic Load Balancer (CLB).
 *
 * @param request DescribeLoadBalancerTCPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerTCPListenerAttributeResponse
 */
async function describeLoadBalancerTCPListenerAttributeWithOptions(request: DescribeLoadBalancerTCPListenerAttributeRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerTCPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerTCPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of a TCP listener of Classic Load Balancer (CLB).
 *
 * @param request DescribeLoadBalancerTCPListenerAttributeRequest
 * @return DescribeLoadBalancerTCPListenerAttributeResponse
 */
async function describeLoadBalancerTCPListenerAttribute(request: DescribeLoadBalancerTCPListenerAttributeRequest): DescribeLoadBalancerTCPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerTCPListenerAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancerUDPListenerAttributeRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1rtfnodmywb43e*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeLoadBalancerUDPListenerAttributeResponseBody = {
  aclId?: string(name='AclId', description='The ID of the network ACL.', example='123943****'),
  aclIds?: {
    aclId?: [ string ](name='AclId')
  }(name='AclIds'),
  aclStatus?: string(name='AclStatus', description='Indicates whether access control is enabled. Valid values: **on** and **off**. Default value: off.', example='off'),
  aclType?: string(name='AclType', description='The type of the ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specified IP addresses to access an application.

    Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener. If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are blocked. Blacklists apply to scenarios in which you want to deny access from specific IP addresses or CIDR blocks to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.', example='white'),
  backendServerPort?: int32(name='BackendServerPort', description='The backend port used by the CLB instance.

>  If the listener is associated with a vServer group, this parameter is not returned.', example='90'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, this parameter is set to -1. This indicates that the bandwidth of the listener is unlimited.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='-1'),
  description?: string(name='Description', description='The description of the listener.', example='test'),
  healthCheck?: string(name='HealthCheck', description='Indicates whether the health check feature is enabled. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks. Valid values: **1** to **65535**. If this parameter is not set, the port specified by BackendServerPort is used for health checks.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='8080'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period of a health check. If a backend Elastic Compute Service (ECS) instance does not return a health check response within the specified timeout period, the server fails the health check. Valid values: **1** to **300**. Unit: seconds.', example='100'),
  healthCheckExp?: string(name='HealthCheckExp', description='The response string for UDP listener health checks. The string is up to 64 characters in length, and can contain letters and digits.', example='ok'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Valid values: **1** to **50**. Unit: seconds.', example='5'),
  healthCheckReq?: string(name='HealthCheckReq', description='The request string for UDP listener health checks. The string is up to 64 characters in length, and can contain letters and digits.', example='hello'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The healthy threshold. The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**. Valid values: **2** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.', example='53'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1rtfnodmywb43e*****'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group that is associated with the listener.', example='rsp-0bfucw****'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false**: no', example='false'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr** (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  status?: string(name='Status', description='The status of the listener. Valid values:

*   **running**
*   **stopped**', example='stopped'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tags.'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The unhealthy threshold. The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**. Valid values: **2** to **10**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group that is associated with the listener.', example='rsp-cige6j****'),
}

model DescribeLoadBalancerUDPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancerUDPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of a UDP listener.
 *
 * @param request DescribeLoadBalancerUDPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancerUDPListenerAttributeResponse
 */
async function describeLoadBalancerUDPListenerAttributeWithOptions(request: DescribeLoadBalancerUDPListenerAttributeRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancerUDPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancerUDPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of a UDP listener.
 *
 * @param request DescribeLoadBalancerUDPListenerAttributeRequest
 * @return DescribeLoadBalancerUDPListenerAttributeResponse
 */
async function describeLoadBalancerUDPListenerAttribute(request: DescribeLoadBalancerUDPListenerAttributeRequest): DescribeLoadBalancerUDPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancerUDPListenerAttributeWithOptions(request, runtime);
}

model DescribeLoadBalancersRequest {
  address?: string(name='Address', description='The IP address that the CLB instance uses to provide services.', example='192.168.XX.XX'),
  addressIPVersion?: string(name='AddressIPVersion', description='The IP version that is used by the CLB instance. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
  addressType?: string(name='AddressType', description='The network type of the CLB instance. Valid values:

*   **internet:** After an Internet-facing CLB instance is created, the system assigns a public IP address to the CLB instance. Then, the CLB instance can forward requests over the Internet.
*   **intranet:** After an internal-facing CLB instance is created, the system assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over internal networks.', example='intranet'),
  internetChargeType?: string(name='InternetChargeType', description='The metering method of Internet data transfer. Valid values:

*   **paybybandwidth:** pay-by-bandwidth.
*   **paybytraffic:** pay-by-data-transfer.', example='paybytraffic'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

You can specify up to 10 IDs. Separate multiple IDs with commas (,).', example='lb-bp1b6c719dfa****'),
  loadBalancerName?: string(name='LoadBalancerName', description='The name of the CLB instance.

The name must be 1 to 80 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

You can specify up to 10 names. Separate multiple names with commas (,).', example='test'),
  loadBalancerStatus?: string(name='LoadBalancerStatus', description='The status of the CLB instance. Valid values:

*   **inactive:** The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
*   **active:** The CLB instance runs as expected. By default, newly created CLB instances are in the **active** state.
*   **locked:** The CLB instance is locked. After a CLB instance expires, it is locked for seven days. A locked CLB instance cannot forward traffic and you cannot perform operations on the locked CLB instance. However, other settings such as the IP address are retained.', example='active'),
  masterZoneId?: string(name='MasterZoneId', description='The ID of the primary zone to which the CLB instance belongs.', example='cn-hangzhou-b'),
  networkType?: string(name='NetworkType', description='The network type of the internal-facing CLB instance. Valid values:

*   **vpc:** VPC.
*   **classic:** classic network.', example='vpc'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber', description='The page number of the page to return.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page.

Valid values: **1** to **100**.

>  If you specify the **PageSize** parameter, you must also specify the **PageNumber** parameter.', example='50'),
  payType?: string(name='PayType', description='The billing method of the CLB instance. Valid values:

*   Set the value to **PayOnDemand**.', example='PayOnDemand'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-acfmxazb4p****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverId?: string(name='ServerId', description='The ID of the backend server that is added to the CLB instance.', example='vm-server-23****'),
  serverIntranetAddress?: string(name='ServerIntranetAddress', description='The private IP address of the backend server that is added to the CLB instance.

You can specify multiple IP addresses. Separate multiple IP addresses with commas (,).', example='10.XX.XX.102'),
  slaveZoneId?: string(name='SlaveZoneId', description='The ID of the secondary zone to which the CLB instance belongs.

CLB instances on Alibaba Finance Cloud do not support cross-zone deployment.', example='cn-hangzhou-d'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='FinanceDept'),
      value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be at most 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'),
    }
  ](name='Tag', description='The tags.'),
  tags?: string(name='Tags', description='The tags that are added to the CLB instance. The tags must be key-value pairs that are contained in a JSON dictionary.

You can specify up to 10 tags in each call.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
  vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the CLB instance belongs.', example='vsw-bp12mw1f8k3****'),
  vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the CLB instance belongs.', example='vpc-bp1aevy8sof****'),
}

model DescribeLoadBalancersResponseBody = {
  loadBalancers?: {
    loadBalancer?: [ 
    {
      address?: string(name='Address', description='The endpoint of the CLB instance.', example='100.XX.XX.28'),
      addressIPVersion?: string(name='AddressIPVersion', description='The IP version that is used by the CLB instance. Valid values: **ipv4** and **ipv6**.', example='ipv4'),
      addressType?: string(name='AddressType', description='The network type of the CLB instance. Valid values:

*   **internet:** After an Internet-facing CLB instance is created, the system assigns a public IP address to the CLB instance. Then, the CLB instance can forward requests over the Internet.
*   **intranet:** After an internal-facing CLB instance is created, the system assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over internal networks.', example='intranet'),
      bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1:** For a pay-by-data-transfer Internet-facing CLB instance, this value is set to -1. This indicates that the bandwidth is unlimited.
*   **1 to 5120:** For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth for each listener. The sum of the maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='-1'),
      createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2021-12-02T02:49:05Z'),
      createTimeStamp?: long(name='CreateTimeStamp', description='The timestamp when the instance was created.', example='1504147745000'),
      deleteProtection?: string(name='DeleteProtection', description='Indicates whether deletion protection is enabled for the CLB instance. Valid values:

*   **on:** Deletion protection is enabled.
*   **off:** Deletion protection is disabled.', example='off'),
      instanceChargeType?: string(name='InstanceChargeType', description='The metering method of the CLB instance. Valid values:

*   **PayBySpec:** pay-by-specification.
*   **PayByCLCU:** pay-by-LCU.

>  This parameter takes effect only for accounts registered on the China site (aliyun.com) and when the **PayType** parameter is set to **PayOnDemand**.', example='PayBySpec'),
      internetChargeType?: string(name='InternetChargeType', description='The metering method of the Internet-facing CLB instance. Valid values:

*   **3:** pay-by-bandwidth (**paybybandwidth**).
*   **4:** pay-by-data-transfer (**paybytraffic**).', example='3'),
      internetChargeTypeAlias?: string(name='InternetChargeTypeAlias', description='The metering method of Internet data transfer. Valid values:

*   **paybybandwidth:** pay-by-bandwidth.
*   **paybytraffic:** pay-by-data-transfer.', example='paybybandwidth'),
      loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1b6c719dfa****'),
      loadBalancerName?: string(name='LoadBalancerName', description='The name of the CLB instance.', example='lb-bp1o94dp5i6ea****'),
      loadBalancerSpec?: string(name='LoadBalancerSpec', description='The specification of the CLB instance.', example='slb.s1.small'),
      loadBalancerStatus?: string(name='LoadBalancerStatus', description='The status of the CLB instance. Valid values:

*   **inactive:** The CLB instance is disabled. CLB instances in the inactive state do not forward traffic.
*   **active:** The CLB instance runs as expected. By default, newly created CLB instances are in the **active** state.
*   **locked:** The CLB instance is locked.', example='active'),
      masterZoneId?: string(name='MasterZoneId', description='The ID of the primary zone to which the CLB instance belongs.', example='cn-hangzhou-b'),
      modificationProtectionReason?: string(name='ModificationProtectionReason', description='The reason why the configuration read-only mode was enabled. The reason must be 1 to 80 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

> This parameter takes effect only when you set the `ModificationProtectionStatus` parameter to **ConsoleProtection**.', example='ManagedInstance'),
      modificationProtectionStatus?: string(name='ModificationProtectionStatus', description='Indicates whether the configuration read-only mode is enabled for the CLB instance. Valid values:

*   **NonProtection:** The configuration read-only mode is disabled. In this case, you cannot specify the ModificationProtectionReason parameter. If you specify the `ModificationProtectionReason` parameter, the value is cleared.
*   **ConsoleProtection:** The configuration read-only mode is enabled.

>  If you set this parameter to **ConsoleProtection**, you cannot modify the configurations of the CLB instance in the CLB console. However, you can call API operations to modify the configurations of the CLB instance.', example='ConsoleProtection'),
      networkType?: string(name='NetworkType', description='The network type of the internal-facing CLB instance. Valid values:

*   **vpc:** VPC.
*   **classic:** classic network.', example='vpc'),
      payType?: string(name='PayType', description='The billing method of the CLB instance.

*   **PayOnDemand** is returned, which indicates the pay-as-you-go billing method.', example='PayOnDemand'),
      regionId?: string(name='RegionId', description='The ID of the region where the CLB instance was deployed.', example='cn-hangzhou'),
      regionIdAlias?: string(name='RegionIdAlias', description='The region where the CLB instance was deployed.', example='hangzhou'),
      resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-atstuj3r****'),
      slaveZoneId?: string(name='SlaveZoneId', description='The ID of the secondary zone to which the CLB instance belongs.', example='cn-hangzhou-d'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The key of the tag.', example='FinanceDept'),
          tagValue?: string(name='TagValue', description='The value of the tag.', example='FinanceJoshua'),
        }
      ](name='Tag')
      }(name='Tags', description='The tags of the CLB instance.'),
      vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the internal-facing CLB instance belongs.', example='vsw-255ecr****'),
      vpcId?: string(name='VpcId', description='The ID of the VPC in which the internal-facing CLB instance was deployed.', example='vpc-25dvzy9f8****'),
    }
  ](name='LoadBalancer')
  }(name='LoadBalancers', description='An array of CLB instances.'),
  pageNumber?: int32(name='PageNumber', description='The page number of the returned page.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries returned on the current page.', example='50'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E'),
  totalCount?: int32(name='TotalCount', description='The number of instances returned.', example='1'),
}

model DescribeLoadBalancersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLoadBalancersResponseBody(name='body'),
}

/**
 * @summary Queries Classic Load Balancer (CLB) instances.
 *
 * @param request DescribeLoadBalancersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLoadBalancersResponse
 */
async function describeLoadBalancersWithOptions(request: DescribeLoadBalancersRequest, runtime: Util.RuntimeOptions): DescribeLoadBalancersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.address)) {
    query['Address'] = request.address;
  }
  if (!Util.isUnset(request.addressIPVersion)) {
    query['AddressIPVersion'] = request.addressIPVersion;
  }
  if (!Util.isUnset(request.addressType)) {
    query['AddressType'] = request.addressType;
  }
  if (!Util.isUnset(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerName)) {
    query['LoadBalancerName'] = request.loadBalancerName;
  }
  if (!Util.isUnset(request.loadBalancerStatus)) {
    query['LoadBalancerStatus'] = request.loadBalancerStatus;
  }
  if (!Util.isUnset(request.masterZoneId)) {
    query['MasterZoneId'] = request.masterZoneId;
  }
  if (!Util.isUnset(request.networkType)) {
    query['NetworkType'] = request.networkType;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverId)) {
    query['ServerId'] = request.serverId;
  }
  if (!Util.isUnset(request.serverIntranetAddress)) {
    query['ServerIntranetAddress'] = request.serverIntranetAddress;
  }
  if (!Util.isUnset(request.slaveZoneId)) {
    query['SlaveZoneId'] = request.slaveZoneId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLoadBalancers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Classic Load Balancer (CLB) instances.
 *
 * @param request DescribeLoadBalancersRequest
 * @return DescribeLoadBalancersResponse
 */
async function describeLoadBalancers(request: DescribeLoadBalancersRequest): DescribeLoadBalancersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLoadBalancersWithOptions(request, runtime);
}

model DescribeMasterSlaveServerGroupAttributeRequest {
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.

This parameter is required.', example='rsp-cige6j******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeMasterSlaveServerGroupAttributeResponseBody = {
  createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-12-02T02:49:05Z'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the associated CLB instance.', example='lb-14fadafw4343a******'),
  masterSlaveBackendServers?: {
    masterSlaveBackendServer?: [ 
    {
      description?: string(name='Description', description='The description of the primary/secondary server group.', example='Primary and secondary server group description'),
      port?: int32(name='Port', description='The port used by the backend server.', example='90'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='vm-hrf******'),
      serverType?: string(name='ServerType', description='The type of backend server. Valid values: **Master and Slave. Default value: Master.', example='Slave'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs** (default): an Elastic Compute Service (ECS) instance
*   **eni**: an elastic network interface (ENI)', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='MasterSlaveBackendServer')
  }(name='MasterSlaveBackendServers', description='The list of backend servers in the primary/secondary server group.'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.', example='rsp-cige6******'),
  masterSlaveServerGroupName?: string(name='MasterSlaveServerGroupName', description='The name of the primary/secondary server group.', example='Group1'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key.', example='test'),
      tagValue?: string(name='TagValue', description='The tag value.', example='value'),
    }
  ](name='Tag')
  }(name='Tags', description='The tag list.'),
}

model DescribeMasterSlaveServerGroupAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMasterSlaveServerGroupAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the detailed information about a primary/secondary server group.
 *
 * @param request DescribeMasterSlaveServerGroupAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMasterSlaveServerGroupAttributeResponse
 */
async function describeMasterSlaveServerGroupAttributeWithOptions(request: DescribeMasterSlaveServerGroupAttributeRequest, runtime: Util.RuntimeOptions): DescribeMasterSlaveServerGroupAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMasterSlaveServerGroupAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the detailed information about a primary/secondary server group.
 *
 * @param request DescribeMasterSlaveServerGroupAttributeRequest
 * @return DescribeMasterSlaveServerGroupAttributeResponse
 */
async function describeMasterSlaveServerGroupAttribute(request: DescribeMasterSlaveServerGroupAttributeRequest): DescribeMasterSlaveServerGroupAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMasterSlaveServerGroupAttributeWithOptions(request, runtime);
}

model DescribeMasterSlaveServerGroupsRequest {
  description?: string(name='Description', description='The description of the primary/secondary server group.', example='test-112', nullable=true),
  includeListener?: boolean(name='IncludeListener', description='Specifies whether to return information about the associated listeners. Valid values:

*   **true**
*   **false**', example='false'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-bp14zi0n66zpg6o******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of tag N. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length, and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`.', example='TestKey'),
      value?: string(name='Value', description='The value of tag N. Valid values of N: **1 to 20**. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `aliyun` and `acs:`.', example='value'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeMasterSlaveServerGroupsResponseBody = {
  masterSlaveServerGroups?: {
    masterSlaveServerGroup?: [ 
    {
      associatedObjects?: {
        listeners?: {
          listener?: [ 
          {
            port?: int32(name='Port', description='The listener port.', example='80'),
            protocol?: string(name='Protocol', description='The listener protocol.', example='tcp'),
          }
        ](name='Listener')
        }(name='Listeners', description='The listeners.'),
      }(name='AssociatedObjects', description='The associated resources.'),
      createTime?: string(name='CreateTime', description='The time when the CLB instance was created. Specify the time in the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-12-02T02:49:05Z'),
      masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.', example='rsp-0bfuc******'),
      masterSlaveServerGroupName?: string(name='MasterSlaveServerGroupName', description='The name of the primary/secondary server group.', example='Group3'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='test_slb_yaochi_tag_key-0'),
          tagValue?: string(name='TagValue', description='The tag value.', example='000098dab00323fb'),
        }
      ](name='Tag')
      }(name='Tags', description='The tags to add to the resource.'),
    }
  ](name='MasterSlaveServerGroup')
  }(name='MasterSlaveServerGroups', description='The primary/secondary server groups.'),
  requestId?: string(name='RequestId', description='The request ID.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
}

model DescribeMasterSlaveServerGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMasterSlaveServerGroupsResponseBody(name='body'),
}

/**
 * @summary Queries primary/secondary server groups.
 *
 * @param request DescribeMasterSlaveServerGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMasterSlaveServerGroupsResponse
 */
async function describeMasterSlaveServerGroupsWithOptions(request: DescribeMasterSlaveServerGroupsRequest, runtime: Util.RuntimeOptions): DescribeMasterSlaveServerGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.includeListener)) {
    query['IncludeListener'] = request.includeListener;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMasterSlaveServerGroups',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries primary/secondary server groups.
 *
 * @param request DescribeMasterSlaveServerGroupsRequest
 * @return DescribeMasterSlaveServerGroupsResponse
 */
async function describeMasterSlaveServerGroups(request: DescribeMasterSlaveServerGroupsRequest): DescribeMasterSlaveServerGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMasterSlaveServerGroupsWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  acceptLanguage?: string(name='AcceptLanguage', description='The supported language. Valid values:

*   zh-CN: Chinese
*   en-US: English
*   ja: Japanese', example='zh-CN'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeRegionsResponseBody = {
  regions?: {
    region?: [ 
    {
      localName?: string(name='LocalName', description='The name of the region.', example='China (Beijing)'),
      regionEndpoint?: string(name='RegionEndpoint', description='The endpoint of the region.', example='slb.aliyuncs.com'),
      regionId?: string(name='RegionId', description='The ID of the region.', example='cn-beijing'),
    }
  ](name='Region')
  }(name='Regions', description='The list of regions.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='1651FBB6-4FBF-49FF-A9F5-DF5D696C7EC6'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @summary Queries regions.
 *
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.acceptLanguage)) {
    query['AcceptLanguage'] = request.acceptLanguage;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries regions.
 *
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeRuleAttributeRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleId?: string(name='RuleId', description='The ID of the forwarding rule.

This parameter is required.', example='rule-bp1efemp9****'),
}

model DescribeRuleAttributeResponseBody = {
  cookie?: string(name='Cookie', description='The cookie to be configured on the backend server.

The cookie must be 1 to 200 characters in length and can contain ASCII letters and digits. It cannot contain commas (,), semicolons (;), or whitespace characters. It cannot start with a dollar sign ($).

If you set the **StickySession** parameter to **on** and the **StickySessionType** parameter to **server**, this parameter is required.', example='wwe'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie.

Valid values: **1 to 86400**. Unit: seconds.

>  If you set the **StickySession** parameter to **on** and the **StickySessionType** parameter to **insert**, this parameter is required.', example='12'),
  domain?: string(name='Domain', description='The domain name that is configured in the forwarding rule.', example='test.com'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable health checks.

Valid values: **on** and **off**.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='off'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port of the backend server that is used for health checks.

Valid values: **1** to **65535**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required. If you left this parameter empty and the **HealthCheck** parameter is set to **on**, the backend port configuration of the listener is used by default.', example='23'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: The private IP address of the backend server. If the $_ip parameter is set or the HealthCheckDomain parameter is not set, SLB uses the private IP addresses of backend servers as the domain names for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length. It can contain only letters, digits, periods (.),and hyphens (-).

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='www.example.com'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code that indicates a successful health check. Separate multiple HTTP status codes with commas (,). Default value: **http_2xx**.

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The time interval between two consecutive health checks.

Valid values: **1** to **50**. Unit: seconds.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='34'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend ECS instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy.

Valid values: **1** to **300**. Unit: seconds.

>  If the value of the **HealthCHeckTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the value of the **HealthCHeckTimeout** parameter is ignored and the value of the **HealthCheckInterval** parameter is regarded as the waiting period. If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='34'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='10.21.22.1'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy. In this case, the health check state is changed from **fail** to **success**.

Valid values: **2** to **10**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='2'),
  listenerPort?: string(name='ListenerPort', description='The listener port that is used by the SLB instance.', example='90'),
  listenerSync?: string(name='ListenerSync', description='Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener.

Valid values: **on** and **off**.

*   **off**: does not use the configurations of the listener. You can customize health check and session persistence configurations for the forwarding rule.
*   **on**: uses the configurations of the listener.', example='off'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.', example='lb-bp1ca0zt07t934wxe****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  ruleId?: string(name='RuleId', description='The ID of the forwarding rule.', example='rule-hfgnd*****'),
  ruleName?: string(name='RuleName', description='The name of the forwarding rule.', example='Rule1'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr** (default): Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='wrr'),
  stickySession?: string(name='StickySession', description='Indicates whether session persistence is enabled.

Valid values: **on** and **off**.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='off'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie into the response. SLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response packet that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.
*   **server**: rewrites a cookie. When SLB detects a user-defined cookie, SLB overwrites the original cookie with the user-defined cookie. The next request from the client contains the user-defined cookie, and the listener distributes the request to the recorded backend server.

>  If you set the **StickySession** parameter to **on**, this parameter is required.', example='insert'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy. In this case, the health check state is changed from **success** to **fail**.

Valid values: **2** to **10**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='3'),
  url?: string(name='Url', description='The URL that is configured in the forwarding rule.', example='/cache'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group that is associated with the forwarding rule.', example='rsp-cige6j****'),
}

model DescribeRuleAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRuleAttributeResponseBody(name='body'),
}

/**
 * @summary Queries the configurations of a specified forwarding rule.
 *
 * @param request DescribeRuleAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRuleAttributeResponse
 */
async function describeRuleAttributeWithOptions(request: DescribeRuleAttributeRequest, runtime: Util.RuntimeOptions): DescribeRuleAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRuleAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the configurations of a specified forwarding rule.
 *
 * @param request DescribeRuleAttributeRequest
 * @return DescribeRuleAttributeResponse
 */
async function describeRuleAttribute(request: DescribeRuleAttributeRequest): DescribeRuleAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRuleAttributeWithOptions(request, runtime);
}

model DescribeRulesRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend listener port that is used by the Server Load Balancer (SLB) instance.

Valid values: **1 to 65535**.

This parameter is required.', example='90'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend listener protocol that is used by the SLB instance.

>  This parameter is required when listeners that use different protocols listen on the same port.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp1ca0zt07t934****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the SLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeRulesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  rules?: {
    rule?: [ 
    {
      cookie?: string(name='Cookie', description='The cookie that is configured on the backend server.

The value must be 1 to 200 characters in length, and can contain only ASCII letters and digits. It cannot contain commas (,), semicolons (;), or spaces. It cannot start with a dollar sign ($).

>  If you set the **StickySession** parameter to **on** and the **StickySessionType** parameter to **server**, this parameter is required.', example='23'),
      cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Valid values: **1 to 86400**. Unit: seconds.

>  If you set the **StickySession** parameter to **on** and the **StickySessionType** parameter to **insert**, this parameter is required.', example='56'),
      domain?: string(name='Domain', description='The requested domain name specified in the forwarding rule.', example='test.com'),
      healthCheck?: string(name='HealthCheck', description='Indicates whether health checks are enabled.

Valid values: **on** and **off**.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='off'),
      healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port of the backend server that is used for health check.

Valid values: **1 to 65535**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required. If you left this parameter empty and the **HealthCheck** parameter is set to **on**, the backend port configuration of the listener is used by default.', example='45'),
      healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: The private IP address of the backend server.

    If you do not set this parameter or set the parameter to $_ip, the SLB instance uses the private IP address of each backend server as the domain name for health checks.

*   **domain**: The domain name must be 1 to 80 characters in length. The domain name can contain only letters, digits, periods (.),and hyphens (-).

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='www.domain.com'),
      healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code that indicates a successful health check. Multiple HTTP status codes are separated by commas (,). Default value: **http_2xx**.

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='http_3xx'),
      healthCheckInterval?: int32(name='HealthCheckInterval', description='The time interval between two consecutive health checks.

Valid values: **1 to 50**. Unit: seconds.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='5'),
      healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period for a health check response. If the backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the health check fails.

Valid values: **1 to 300**. Unit: seconds.

>  If the value of the **HealthCHeckTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the value of the **HealthCHeckTimeout** parameter is ignored and the value of the **HealthCheckInterval** parameter is regarded as the waiting period. If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='34'),
      healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='/example'),
      healthyThreshold?: int32(name='HealthyThreshold', description='Specifies the number of successful health checks that must be consecutively performed before a backend server can be declared healthy (from **fail** to **success**).

Valid values: **2 to 10**.

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='5'),
      listenerSync?: string(name='ListenerSync', description='Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener.

Valid values: **on** and **off**.

*   **off**: does not use the configurations of the listener. You can customize health check and session persistence configurations for the forwarding rule.
*   **on**: uses the configurations of the listener.', example='off'),
      ruleId?: string(name='RuleId', description='The ID of the forwarding rule.', example='rule-tybqi6****'),
      ruleName?: string(name='RuleName', description='The name of the forwarding rule. The name must be 1 to 80 characters in length, and can contain only letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

>  The name of each forwarding rule must be unique within a listener.', example='Rule2'),
      scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr** (default): Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='wrr'),
      stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence.

Valid values: **on** and **off**.

>  If you set the **ListenerSync** parameter to **off**, this parameter is required. If you set the parameter to **on**, the configuration of the listener is used.', example='off'),
      stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie into the response. SLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response packet that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.
*   **server**: rewrites a cookie. When SLB detects a user-defined cookie, SLB overwrites the original cookie with the user-defined cookie. The next request from the client contains the user-defined cookie, and the listener distributes the request to the recorded backend server.

>  If you set the **StickySession** parameter to **on**, this parameter is required.', example='insert'),
      unhealthyThreshold?: int32(name='UnhealthyThreshold', description='Specifies the number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy (from **success** to **fail**).

Valid values: **2 to 10**

>  If you set the **HealthCheck** parameter to **on**, this parameter is required.', example='2'),
      url?: string(name='Url', description='The requested path specified in the forwarding rule.', example='/cache'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the destination vServer group specified in the forwarding rule.', example='rsp-6cejjzl****'),
    }
  ](name='Rule')
  }(name='Rules', description='The list of forwarding rules.'),
}

model DescribeRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRulesResponseBody(name='body'),
}

/**
 * @summary Queries the forwarding rules that are configured for a specified listener.
 *
 * @param request DescribeRulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRulesResponse
 */
async function describeRulesWithOptions(request: DescribeRulesRequest, runtime: Util.RuntimeOptions): DescribeRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRules',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the forwarding rules that are configured for a specified listener.
 *
 * @param request DescribeRulesRequest
 * @return DescribeRulesResponse
 */
async function describeRules(request: DescribeRulesRequest): DescribeRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRulesWithOptions(request, runtime);
}

model DescribeServerCertificatesRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the CLB instances are deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

>  If the endpoint of the region is slb.aliyuncs.com, you must specify the `RegionId` parameter.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-atstuj3rtop****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='12315790*******_166f8204689_1714763408_709981430'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='test'),
      value?: string(name='Value', description='The tag value.', example='1'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeServerCertificatesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  serverCertificates?: {
    serverCertificate?: [ 
    {
      aliCloudCertificateId?: string(name='AliCloudCertificateId', description='The ID of the server certificate from Alibaba Cloud Certificate Management Service.', example='7309********_15d97e7709a_71445759hr_789289731'),
      aliCloudCertificateName?: string(name='AliCloudCertificateName', description='The name of the server certificate from Alibaba Cloud Certificate Management Service.', example='testcertkey'),
      commonName?: string(name='CommonName', description='The domain name of the certificate. The domain name is specified in the `CommonName` field.', example='www.example.com'),
      createTime?: string(name='CreateTime', description='The time when the server certificate is uploaded.', example='2021-08-31T02:49:05Z'),
      createTimeStamp?: long(name='CreateTimeStamp', description='The timestamp generated when the server certificate is uploaded.', example='1504147745000'),
      expireTime?: string(name='ExpireTime', description='The expiration time.', example='2023-01-26T23:59:59Z'),
      expireTimeStamp?: long(name='ExpireTimeStamp', description='The timestamp that indicates when the certificate expires.', example='15041477450'),
      fingerprint?: string(name='Fingerprint', description='The fingerprint of the server certificate.', example='68:08:1a:f8:2c:97:69:a3:a1:e6:16:41:4b:ca:4f:5d:ee:a5:ef:0d'),
      isAliCloudCertificate?: int32(name='IsAliCloudCertificate', description='Indicates whether the server certificate is from Alibaba Cloud Certificate Management Service. Valid values:

*   **1**: yes
*   **0**: no', example='0'),
      regionId?: string(name='RegionId', description='The ID of the region where the server certificate is created.', example='cn-hangzhou'),
      resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-atstuj3rtop****'),
      serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='123157********_166f8204689_1714763408_709981430-cn-east-hangzhou-02'),
      serverCertificateName?: string(name='ServerCertificateName', description='The name of the server certificate.', example='slb'),
      subjectAlternativeNames?: {
        subjectAlternativeName?: [ string ](name='SubjectAlternativeName')
      }(name='SubjectAlternativeNames', description='The list of alternative domain names of the server certificate. The alternative domain names are specified in the `Subject Alternative Name` field of the server certificate.'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag keys of the resource.', example='test'),
          tagValue?: string(name='TagValue', description='The tag value.', example='1'),
        }
      ](name='Tag')
      }(name='Tags', description='The tags.'),
    }
  ](name='ServerCertificate')
  }(name='ServerCertificates', description='The list of server certificates.'),
}

model DescribeServerCertificatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServerCertificatesResponseBody(name='body'),
}

/**
 * @summary Queries server certificates of Classic Load Balancer (CLB) instances in a specified region.
 *
 * @description >  For security reasons, only fingerprints and names of the server certificates are returned. The content of the server certificates and private keys is not returned.
 *
 * @param request DescribeServerCertificatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServerCertificatesResponse
 */
async function describeServerCertificatesWithOptions(request: DescribeServerCertificatesRequest, runtime: Util.RuntimeOptions): DescribeServerCertificatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServerCertificates',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries server certificates of Classic Load Balancer (CLB) instances in a specified region.
 *
 * @description >  For security reasons, only fingerprints and names of the server certificates are returned. The content of the server certificates and private keys is not returned.
 *
 * @param request DescribeServerCertificatesRequest
 * @return DescribeServerCertificatesResponse
 */
async function describeServerCertificates(request: DescribeServerCertificatesRequest): DescribeServerCertificatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServerCertificatesWithOptions(request, runtime);
}

model DescribeTagsRequest {
  distinctKey?: boolean(name='DistinctKey', description='Specifies whether the tag is DistinctKey.

Valid values: **true and false**.', example='false'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.', example='139a00604ad-cn-east-hangzhou-01'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber', description='The number of the page to return. Minimum value: 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries to return on each page. Default value: 50. Maximum value: 100.', example='50'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags that you want to query.', example='[{"TagKey":"Key1","TagValue":"Value1"},{"TagKey":"Key2","TagValue":"Value2"}]'),
}

model DescribeTagsResponseBody = {
  pageNumber?: int32(name='PageNumber', description='The number of the returned page. Minimum value: 1. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='Default value: 50. Maximum value: 100.', example='50'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  tagSets?: {
    tagSet?: [ 
    {
      instanceCount?: int32(name='InstanceCount', description='The number of instances to which the tag is added.', example='10'),
      tagKey?: string(name='TagKey', description='The tag key.', example='test'),
      tagValue?: string(name='TagValue', description='The tag value.', example='api'),
    }
  ](name='TagSet')
  }(name='TagSets', description='A list of tags.'),
  totalCount?: int32(name='TotalCount', description='The number of instances returned.', example='1'),
}

model DescribeTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTagsResponseBody(name='body'),
}

/**
 * @summary Queries tags.
 *
 * @description When you call this operation, take note of the following items:
 * *   You can query tags by instance ID, tag key, and tag value. If the operation is successful, the system returns all tags that match the specified conditions.
 * *   The logical relationship among the specified conditions is AND. Only tags that match all the specified conditions are returned.
 * *   If the Tagkey parameter is set and the Tagvalue parameter is not set, all tags that contain the specified tag key are returned.
 * *   If you set the Tagvalue parameter in a request, you must also set the Tagkey parameter in the request.
 * *   If you set both the Tagkey and Tagvalue parameters, only tags that contain the specified keys and values are returned.
 *
 * @param request DescribeTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTagsResponse
 */
async function describeTagsWithOptions(request: DescribeTagsRequest, runtime: Util.RuntimeOptions): DescribeTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.distinctKey)) {
    query['DistinctKey'] = request.distinctKey;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTags',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries tags.
 *
 * @description When you call this operation, take note of the following items:
 * *   You can query tags by instance ID, tag key, and tag value. If the operation is successful, the system returns all tags that match the specified conditions.
 * *   The logical relationship among the specified conditions is AND. Only tags that match all the specified conditions are returned.
 * *   If the Tagkey parameter is set and the Tagvalue parameter is not set, all tags that contain the specified tag key are returned.
 * *   If you set the Tagvalue parameter in a request, you must also set the Tagkey parameter in the request.
 * *   If you set both the Tagkey and Tagvalue parameters, only tags that contain the specified keys and values are returned.
 *
 * @param request DescribeTagsRequest
 * @return DescribeTagsResponse
 */
async function describeTags(request: DescribeTagsRequest): DescribeTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTagsWithOptions(request, runtime);
}

model DescribeVServerGroupAttributeRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.

This parameter is required.', example='rsp-cige6****'),
}

model DescribeVServerGroupAttributeResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the vServer group.', example='Server Group Description'),
      port?: int32(name='Port', description='The port used by the backend server.', example='90'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance, ENI, or elastic container instance.', example='vm-233'),
      serverIp?: string(name='ServerIp', description='The IP address of the ECS instance, ENI, or elastic container instance.', example='192.XX.XX.11'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs** (default): an Elastic Compute Service (ECS) instance
*   **eni**: an elastic network interface (ENI)
*   **eci**: an elastic container instance', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-08-31T02:49:05Z'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-jfakd****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  tags?: {
    tag?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
    }
  ](name='Tag')
  }(name='Tags', description='The tag list.'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6****'),
  VServerGroupName?: string(name='VServerGroupName', description='The name of the vServer group.', example='Group1'),
}

model DescribeVServerGroupAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVServerGroupAttributeResponseBody(name='body'),
}

/**
 * @summary Queries detailed information about a vServer group.
 *
 * @param request DescribeVServerGroupAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVServerGroupAttributeResponse
 */
async function describeVServerGroupAttributeWithOptions(request: DescribeVServerGroupAttributeRequest, runtime: Util.RuntimeOptions): DescribeVServerGroupAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVServerGroupAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries detailed information about a vServer group.
 *
 * @param request DescribeVServerGroupAttributeRequest
 * @return DescribeVServerGroupAttributeResponse
 */
async function describeVServerGroupAttribute(request: DescribeVServerGroupAttributeRequest): DescribeVServerGroupAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVServerGroupAttributeWithOptions(request, runtime);
}

model DescribeVServerGroupsRequest {
  description?: string(name='Description', description='The name of the vServer group.', example='Group3', nullable=true),
  includeListener?: boolean(name='IncludeListener', description='Specifies whether to return information about the associated listeners. Valid values:

*   **true**: yes
*   **false** (default): no', example='false'),
  includeRule?: boolean(name='IncludeRule', description='Specifies whether to return the forwarding rules associated with the vServer groups. Valid values:

*   **true**: yes
*   **false** (default): no', example='false'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1o94dp5i6ea*******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.', example='TestKey'),
      value?: string(name='Value', description='The tag value.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
}

model DescribeVServerGroupsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroups?: {
    VServerGroup?: [ 
    {
      associatedObjects?: {
        listeners?: {
          listener?: [ 
          {
            port?: int32(name='Port', description='The listening port.', example='80'),
            protocol?: string(name='Protocol', description='The listening protocol. Valid values: **tcp**, **udp**, **http**, and **https**.', example='tcp'),
          }
        ](name='Listener')
        }(name='Listeners', description='The list of listeners.'),
        rules?: {
          rule?: [ 
          {
            domain?: string(name='Domain', description='The requested domain name.', example='www.example.com'),
            ruleId?: string(name='RuleId', description='The ID of the forwarding rule.', example='rule-a3x3pg1yohq3lq****'),
            ruleName?: string(name='RuleName', description='The name of the forwarding rule.', example='test'),
            url?: string(name='Url', description='The request path.', example='/example'),
          }
        ](name='Rule')
        }(name='Rules', description='The list of forwarding rules.'),
      }(name='AssociatedObjects', description='The items associated with the server groups.'),
      createTime?: string(name='CreateTime', description='The time when the CLB instance was created. The time follows the `YYYY-MM-DDThh:mm:ssZ` format.', example='2022-08-31T02:49:05Z'),
      serverCount?: long(name='ServerCount', description='The number of servers. 

>  The feature corresponding to this parameter is not available by default. If you want to use this feature, [submit a ticket](https://ticket-intl.console.aliyun.com/#/ticket/createIndex).', example='1'),
      tags?: {
        tag?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag keys of the resource.', example='TestKey'),
          tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
        }
      ](name='Tag')
      }(name='Tags', description='The tags.'),
      VServerGroupId?: string(name='VServerGroupId', description='The ID of the server group.', example='rsp-0bfucwuotx'),
      VServerGroupName?: string(name='VServerGroupName', description='The name of the server group.', example='Group3'),
    }
  ](name='VServerGroup')
  }(name='VServerGroups', description='The list of backend servers.'),
}

model DescribeVServerGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVServerGroupsResponseBody(name='body'),
}

/**
 * @summary Queries server groups.
 *
 * @param request DescribeVServerGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVServerGroupsResponse
 */
async function describeVServerGroupsWithOptions(request: DescribeVServerGroupsRequest, runtime: Util.RuntimeOptions): DescribeVServerGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.includeListener)) {
    query['IncludeListener'] = request.includeListener;
  }
  if (!Util.isUnset(request.includeRule)) {
    query['IncludeRule'] = request.includeRule;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVServerGroups',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries server groups.
 *
 * @param request DescribeVServerGroupsRequest
 * @return DescribeVServerGroupsResponse
 */
async function describeVServerGroups(request: DescribeVServerGroupsRequest): DescribeVServerGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVServerGroupsWithOptions(request, runtime);
}

model DescribeZonesRequest {
  ownerAccount?: string(name='OwnerAccount', description='The logon name of the RAM user.', example='testuser@aliyun.com'),
  ownerId?: long(name='OwnerId', description='The ID of the Alibaba Cloud account to which the VPC belongs.', example='1171915672241348'),
  regionId?: string(name='RegionId', description='The region ID of the Server Load Balancer (SLB) instance.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount', description='ResourceOwnerAccount', example='cmdb@5397832129092425.onaliyun.com'),
  resourceOwnerId?: long(name='ResourceOwnerId', description='The ID of the asset owner.', example='1592622395492712'),
}

model DescribeZonesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='A48D35FF-440A-4BC0-A4A2-A9BF69B7E43A'),
  zones?: {
    zone?: [ 
    {
      localName?: string(name='LocalName', description='The name of the zone.', example='The list of secondary zones.'),
      slaveZones?: {
        slaveZone?: [ 
        {
          localName?: string(name='LocalName', description='The name of the secondary zone.', example='Queries zones in a specified region.'),
          zoneId?: string(name='ZoneId', description='The ID of the secondary zone.', example='cn-hangzhou-g'),
        }
      ](name='SlaveZone')
      }(name='SlaveZones', description='The secondary zones.'),
      zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-hangzhou-b'),
    }
  ](name='Zone')
  }(name='Zones', description='The zones.'),
}

model DescribeZonesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeZonesResponseBody(name='body'),
}

/**
 * @summary Queries the zones in a region.
 *
 * @param request DescribeZonesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeZonesResponse
 */
async function describeZonesWithOptions(request: DescribeZonesRequest, runtime: Util.RuntimeOptions): DescribeZonesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeZones',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries the zones in a region.
 *
 * @param request DescribeZonesRequest
 * @return DescribeZonesResponse
 */
async function describeZones(request: DescribeZonesRequest): DescribeZonesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeZonesWithOptions(request, runtime);
}

model EnableHighDefinationMonitorRequest {
  logProject?: string(name='LogProject', description='The name of the project of Log Service. The name must be 4 to 63 characters in length, and can contain digits and lowercase letters. It must start and end with a digit or a letter.

This parameter is required.', example='my-project'),
  logStore?: string(name='LogStore', description='The name of the Logstore of Log Service. The name must be 2 to 64 characters in length and can contain digits, lowercase letters, hyphens (-) and underscores (_). It must start and end with a digit or a letter.

This parameter is required.', example='my-log-store'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags of the logs. The tags must be key-value pairs that are contained in a JSON dictionary.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
}

model EnableHighDefinationMonitorResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='2F398FF5-B349-5C01-8638-8E9A0BF1DBE6'),
  success?: string(name='Success', description='Indicates whether the call is successful. Valid values:

*   **true**: yes
*   **false**: no', example='true'),
}

model EnableHighDefinationMonitorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableHighDefinationMonitorResponseBody(name='body'),
}

/**
 * @summary Enables fine-grained monitoring for the current region.
 *
 * @param request EnableHighDefinationMonitorRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableHighDefinationMonitorResponse
 */
async function enableHighDefinationMonitorWithOptions(request: EnableHighDefinationMonitorRequest, runtime: Util.RuntimeOptions): EnableHighDefinationMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.logProject)) {
    query['LogProject'] = request.logProject;
  }
  if (!Util.isUnset(request.logStore)) {
    query['LogStore'] = request.logStore;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableHighDefinationMonitor',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables fine-grained monitoring for the current region.
 *
 * @param request EnableHighDefinationMonitorRequest
 * @return EnableHighDefinationMonitorResponse
 */
async function enableHighDefinationMonitor(request: EnableHighDefinationMonitorRequest): EnableHighDefinationMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableHighDefinationMonitorWithOptions(request, runtime);
}

model ListTLSCipherPoliciesRequest {
  includeListener?: boolean(name='IncludeListener', description='Specifies whether to return the information about the associated listeners. Valid values:

*   **true**: returns the information about the associated listeners.
*   **false** (default): does not return the information about the associated listeners.', example='false'),
  maxItems?: int32(name='MaxItems', description='The maximum number of TLS policies to be queried in this call. Valid values: **1** to **100**. If you do not set this parameter, the default value **20** is used.', example='20'),
  name?: string(name='Name', description='The name of the TLS policy. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.', example='TLSPolicy-test****'),
  nextToken?: string(name='NextToken', description='The token that is used for the next query. Valid values:

*   If this is your first query or no next query is to be sent, ignore this parameter.
*   If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  TLSCipherPolicyId?: string(name='TLSCipherPolicyId', description='The ID of the TLS policy.', example='tls-bp17elso1h323r****'),
}

model ListTLSCipherPoliciesResponseBody = {
  isTruncated?: boolean(name='IsTruncated', description='Indicates whether the current page is the last page. Valid values:

*   **true**: The current page is the last page.
*   **false**: The current page is not the last page.', example='false'),
  nextToken?: string(name='NextToken', description='The token that is used for the next query. Valid values:

*   If **NextToken** is empty, it indicates that no next query is to be sent.
*   If **NextToken** is not empty, the value indicates the token that is used for the next query.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
  TLSCipherPolicies?: [ 
    {
      ciphers?: [ string ](name='Ciphers', description='The cipher suites supported by the TLS version.

TLS 1.0 and TLS 1.1 support the following cipher suites:

*   ECDHE-ECDSA-AES128-SHA
*   ECDHE-ECDSA-AES256-SHA
*   ECDHE-RSA-AES128-SHA
*   ECDHE-RSA-AES256-SHA
*   AES128-SHA AES256-SHA
*   DES-CBC3-SHA

TLS 1.2 supports the following cipher suites:

*   ECDHE-ECDSA-AES128-SHA
*   ECDHE-ECDSA-AES256-SHA
*   ECDHE-RSA-AES128-SHA
*   ECDHE-RSA-AES256-SHA
*   AES128-SHA AES256-SHA
*   DES-CBC3-SHA
*   ECDHE-ECDSA-AES128-GCM-SHA256
*   ECDHE-ECDSA-AES256-GCM-SHA384
*   ECDHE-ECDSA-AES128-SHA256
*   ECDHE-ECDSA-AES256-SHA384
*   ECDHE-RSA-AES128-GCM-SHA256
*   ECDHE-RSA-AES256-GCM-SHA384
*   ECDHE-RSA-AES128-SHA256
*   ECDHE-RSA-AES256-SHA384
*   AES128-GCM-SHA256
*   AES256-GCM-SHA384
*   AES128-SHA256 AES256-SHA256

TLS 1.3 supports the following cipher suites:

*   TLS_AES_128_GCM_SHA256
*   TLS_AES_256_GCM_SHA384
*   TLS_CHACHA20_POLY1305_SHA256
*   TLS_AES_128_CCM_SHA256
*   TLS_AES_128_CCM_8_SHA256'),
      createTime?: long(name='CreateTime', description='The timestamp generated when the TLS policy is created.', example='1608273800000'),
      instanceId?: string(name='InstanceId', description='The ID of the TLS policy.', example='tls-bp17elso1h323r****'),
      name?: string(name='Name', description='The name of the TLS policy.', example='TLSPolicy-test****'),
      relateListeners?: [ 
        {
          loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1b6c719dfa08ex****'),
          port?: int32(name='Port', description='The listening port. Valid values: **1** to **65535**.', example='80'),
          protocol?: string(name='Protocol', description='The listening protocol. Valid values:

*   **TCP**
*   **UDP**
*   **HTTP**
*   **HTTPS**', example='HTTPS'),
        }
      ](name='RelateListeners', description='The list of associated listeners.'),
      status?: string(name='Status', description='The status of the TLS policy. Valid values:

*   **configuring**: The TLS policy is being configured.
*   **normal**: The TLS policy works as expected.', example='normal'),
      TLSVersions?: [ string ](name='TLSVersions', description='The version of the TLS protocol.'),
    }
  ](name='TLSCipherPolicies', description='The list of TLS policies.'),
  totalCount?: int32(name='TotalCount', description='The total number of TLS policies returned.', example='1000'),
}

model ListTLSCipherPoliciesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTLSCipherPoliciesResponseBody(name='body'),
}

/**
 * @summary Queries Transport Layer Security (TLS) policies.
 *
 * @param request ListTLSCipherPoliciesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTLSCipherPoliciesResponse
 */
async function listTLSCipherPoliciesWithOptions(request: ListTLSCipherPoliciesRequest, runtime: Util.RuntimeOptions): ListTLSCipherPoliciesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.includeListener)) {
    query['IncludeListener'] = request.includeListener;
  }
  if (!Util.isUnset(request.maxItems)) {
    query['MaxItems'] = request.maxItems;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.TLSCipherPolicyId)) {
    query['TLSCipherPolicyId'] = request.TLSCipherPolicyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTLSCipherPolicies',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries Transport Layer Security (TLS) policies.
 *
 * @param request ListTLSCipherPoliciesRequest
 * @return ListTLSCipherPoliciesResponse
 */
async function listTLSCipherPolicies(request: ListTLSCipherPoliciesRequest): ListTLSCipherPoliciesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTLSCipherPoliciesWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken', description='The token that determines the start point of the query. Valid values:

*   If this is your first query or no subsequent query is to be sent, ignore this parameter.
*   If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceId?: [ string ](name='ResourceId', description='The ID of a resource. You can specify up to 20 resources.', example='lb-bp1qnnvj18yy6h******'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **instance**: an SLB instance
*   **certificate**: a certificate
*   **acl**: a network access control list (ACL)

This parameter is required.', example='instance'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key. You can specify at most 20 tag keys.

The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='FinanceDept'),
      value?: string(name='Value', description='The tag value. You can specify at most 20 tag values. The tag value cannot be an empty string.

The tag value must be 1 to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'),
    }
  ](name='Tag', description='The tags.'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken', description='The token that determines the start point of the query. Valid values:

*   If **NextToken** is empty, it indicates that no subsequent query is to be sent.
*   If a value of **NextToken** is returned, the value is the token that is used for the subsequent query.', example='caeba0bbb2be03f84eb48b699f0a****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DE65F6B7-7566-4802-9007-96F2494AC512'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId', description='The ID of the resource.', example='lb-bp16qjewdsunr4****'),
      resourceType?: string(name='ResourceType', description='The resource type.', example='instance'),
      tagKey?: string(name='TagKey', description='The tag key.', example='FinanceDept'),
      tagValue?: string(name='TagValue', description='The tag value.', example='FinanceJoshua'),
    }
  ](name='TagResource')
  }(name='TagResources', description='The details about the resource to which the tags are added.'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries tags that are added to one or more instances.
 *
 * @description *   Set **ResourceId.N** or **Tag.N** that consists of **Tag.N.Key** and **Tag.N.Value** in the request to specify the object to be queried.
 * *   **Tag.N** is a resource tag that consists of a key-value pair. If you set only **Tag.N.Key**, all tag values that are associated with the specified tag key are returned. If you set only **Tag.N.Value**, an error message is returned.
 * *   If you set **Tag.N** and **ResourceId.N** to filter tags, **ResourceId.N** must match all specified key-value pairs.
 * *   If you specify multiple key-value pairs, resources that contain these key-value pairs are returned.
 *
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Queries tags that are added to one or more instances.
 *
 * @description *   Set **ResourceId.N** or **Tag.N** that consists of **Tag.N.Key** and **Tag.N.Value** in the request to specify the object to be queried.
 * *   **Tag.N** is a resource tag that consists of a key-value pair. If you set only **Tag.N.Key**, all tag values that are associated with the specified tag key are returned. If you set only **Tag.N.Value**, an error message is returned.
 * *   If you set **Tag.N** and **ResourceId.N** to filter tags, **ResourceId.N** must match all specified key-value pairs.
 * *   If you specify multiple key-value pairs, resources that contain these key-value pairs are returned.
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ModifyHighDefinationMonitorRequest {
  logProject?: string(name='LogProject', description='The new name of the project of Log Service. The name must be 4 to 63 characters in length, and can contain digits and lowercase letters. It must start and end with a digit or a letter.

This parameter is required.', example='my-project'),
  logStore?: string(name='LogStore', description='The new name of the Logstore of Log Service. The name must be 2 to 64 characters in length and can contain digits, lowercase letters, hyphens (-) and underscores (_). It must start and end with a digit or a letter.

This parameter is required.', example='my-log-store'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyHighDefinationMonitorResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='8B9DB03B-ED39-5DB8-9C9F-1ED5F548D61E'),
  success?: string(name='Success', description='Indicates whether the call is successful. Valid values:

*   **true**: yes
*   **false**: no', example='true'),
}

model ModifyHighDefinationMonitorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyHighDefinationMonitorResponseBody(name='body'),
}

/**
 * @summary Modifies the configuration of fine-grained monitoring in a specified region.
 *
 * @param request ModifyHighDefinationMonitorRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyHighDefinationMonitorResponse
 */
async function modifyHighDefinationMonitorWithOptions(request: ModifyHighDefinationMonitorRequest, runtime: Util.RuntimeOptions): ModifyHighDefinationMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.logProject)) {
    query['LogProject'] = request.logProject;
  }
  if (!Util.isUnset(request.logStore)) {
    query['LogStore'] = request.logStore;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyHighDefinationMonitor',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configuration of fine-grained monitoring in a specified region.
 *
 * @param request ModifyHighDefinationMonitorRequest
 * @return ModifyHighDefinationMonitorResponse
 */
async function modifyHighDefinationMonitor(request: ModifyHighDefinationMonitorRequest): ModifyHighDefinationMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyHighDefinationMonitorWithOptions(request, runtime);
}

model ModifyLoadBalancerInstanceChargeTypeRequest {
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the Internet-facing CLB instance that is billed on a pay-by-bandwidth basis.

You do not need to set this parameter. The metering method of Internet data transfer for pay-by-LCU instances supports only pay-by-traffic.', example='5'),
  instanceChargeType?: string(name='InstanceChargeType', description='The metering method of the instance after the change.

Valid value: **PayByCLCU**. Only pay-by-LCU is supported.

This parameter is required.', example='PayByCLCU'),
  internetChargeType?: string(name='InternetChargeType', description='The metering method of Internet data transfer after the change.

Valid value: **paybytraffic**.

> *   If the value of the **InstanceChargeType** parameter is set to **PayByCLCU**, only pay-by-data-transfer is supported.
>*   When you change the metering method, the new metering method takes effect at 00:00:00 the next day.', example='paybytraffic'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b3jus5hpenznuu****'),
  loadBalancerSpec?: string(name='LoadBalancerSpec', description='The specification of the CLB instance.

You do not need to set this parameter. For pay-as-you-go CLB instances, you can only change the metering method from pay-by-specification to pay-by-LCU. You cannot change the metering method from pay-by-LCU to pay-by-specification.', example='slb.s1.small'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyLoadBalancerInstanceChargeTypeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model ModifyLoadBalancerInstanceChargeTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyLoadBalancerInstanceChargeTypeResponseBody(name='body'),
}

/**
 * @summary Changes the metering method of a pay-as-you-go Classic Load Balancer (CLB) instance.
 *
 * @description > *   For pay-as-you-go CLB instances, you can only change the metering method from pay-by-specification to pay-by-LCU. You cannot change the metering method from pay-by-LCU to pay-by-specification.
 * >*   This operation can change the metering method of only one instance at a time.
 *
 * @param request ModifyLoadBalancerInstanceChargeTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyLoadBalancerInstanceChargeTypeResponse
 */
async function modifyLoadBalancerInstanceChargeTypeWithOptions(request: ModifyLoadBalancerInstanceChargeTypeRequest, runtime: Util.RuntimeOptions): ModifyLoadBalancerInstanceChargeTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.instanceChargeType)) {
    query['InstanceChargeType'] = request.instanceChargeType;
  }
  if (!Util.isUnset(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerSpec)) {
    query['LoadBalancerSpec'] = request.loadBalancerSpec;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLoadBalancerInstanceChargeType',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Changes the metering method of a pay-as-you-go Classic Load Balancer (CLB) instance.
 *
 * @description > *   For pay-as-you-go CLB instances, you can only change the metering method from pay-by-specification to pay-by-LCU. You cannot change the metering method from pay-by-LCU to pay-by-specification.
 * >*   This operation can change the metering method of only one instance at a time.
 *
 * @param request ModifyLoadBalancerInstanceChargeTypeRequest
 * @return ModifyLoadBalancerInstanceChargeTypeResponse
 */
async function modifyLoadBalancerInstanceChargeType(request: ModifyLoadBalancerInstanceChargeTypeRequest): ModifyLoadBalancerInstanceChargeTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLoadBalancerInstanceChargeTypeWithOptions(request, runtime);
}

model ModifyLoadBalancerInstanceSpecRequest {
  autoPay?: boolean(name='AutoPay', description='Specifies whether to enable automatic payment. Valid values:

*   **true**: automatically completes the payment.
*   **false** (default): If you select this option, you must complete the payment in the Order Center.

> This parameter takes effect only for subscription instances.', example='false'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719df*********'),
  loadBalancerSpec?: string(name='LoadBalancerSpec', description='The specification of the CLB instance. Valid values:

*   **slb.s1.small**
*   **slb.s2.small**
*   **slb.s2.medium**
*   **slb.s3.small**
*   **slb.s3.medium**
*   **slb.s3.large**

The specifications available vary by region. For more information about the specifications, see [High-performance CLB instance](https://help.aliyun.com/document_detail/85931.html).

> When you switch a shared-resource CLB instance to a high-performance CLB instance, your service may be interrupted for 10 to 30 seconds. We recommend that you modify the specification during off-peak hours or use Alibaba Cloud DNS to schedule your workloads to another CLB instance before you modify the specification.

This parameter is required.', example='slb.s2.small'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyLoadBalancerInstanceSpecResponseBody = {
  orderId?: long(name='OrderId', description='The order ID of the subscription CLB instance.', example='201429619788910'),
  requestId?: string(name='RequestId', description='The request ID.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model ModifyLoadBalancerInstanceSpecResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyLoadBalancerInstanceSpecResponseBody(name='body'),
}

/**
 * @summary Modifies the specification of a Classic Load Balancer (CLB) instance.
 *
 * @param request ModifyLoadBalancerInstanceSpecRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyLoadBalancerInstanceSpecResponse
 */
async function modifyLoadBalancerInstanceSpecWithOptions(request: ModifyLoadBalancerInstanceSpecRequest, runtime: Util.RuntimeOptions): ModifyLoadBalancerInstanceSpecResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerSpec)) {
    query['LoadBalancerSpec'] = request.loadBalancerSpec;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLoadBalancerInstanceSpec',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the specification of a Classic Load Balancer (CLB) instance.
 *
 * @param request ModifyLoadBalancerInstanceSpecRequest
 * @return ModifyLoadBalancerInstanceSpecResponse
 */
async function modifyLoadBalancerInstanceSpec(request: ModifyLoadBalancerInstanceSpecRequest): ModifyLoadBalancerInstanceSpecResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLoadBalancerInstanceSpecWithOptions(request, runtime);
}

model ModifyLoadBalancerInternetSpecRequest {
  autoPay?: boolean(name='AutoPay', description='Specifies whether to automatically pay the subscription fee of the Internet-facing CLB instance. Valid values:

*   **true**: enables automatic payments. This is the default value.
*   **false**: disables automatic payment. You must complete the payment in Order Center.', example='false'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the Internet-facing CLB instance that uses the pay-by-bandwidth metering method. Unit: Mbit/s.

Valid values: **1 to 5000**. The maximum bandwidth varies based on the region where the CLB instance is created.****

>  You do not need to specify this parameter if you set **InternetChargeType** to **paybytraffic** (pay-by-data-transfer).', example='10'),
  internetChargeType?: string(name='InternetChargeType', description='The metering method of the Internet-facing CLB instance. Valid values:

*   **paybybandwidth**: pay-by-bandwidth
*   **paybytraffic**: pay-by-data-transfer', example='paybytraffic'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08ex******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyLoadBalancerInternetSpecResponseBody = {
  orderId?: long(name='OrderId', description='The order ID of the subscription CLB instance.', example='20142961978****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model ModifyLoadBalancerInternetSpecResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyLoadBalancerInternetSpecResponseBody(name='body'),
}

/**
 * @summary Modifies the metering method of an Internet-facing Classic Load Balancer (CLB) instance.
 *
 * @description ## Description
 * *   If you modify only the maximum bandwidth of a pay-by-bandwidth CLB instance, the new bandwidth immediately takes effect.
 * *   If you modify the metering method (for example, switch from pay-by-bandwidth to pay-by-data-transfer), the new metering method and the other changes specified in the operation take effect at 00:00:00 the next day.
 *
 * @param request ModifyLoadBalancerInternetSpecRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyLoadBalancerInternetSpecResponse
 */
async function modifyLoadBalancerInternetSpecWithOptions(request: ModifyLoadBalancerInternetSpecRequest, runtime: Util.RuntimeOptions): ModifyLoadBalancerInternetSpecResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLoadBalancerInternetSpec',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the metering method of an Internet-facing Classic Load Balancer (CLB) instance.
 *
 * @description ## Description
 * *   If you modify only the maximum bandwidth of a pay-by-bandwidth CLB instance, the new bandwidth immediately takes effect.
 * *   If you modify the metering method (for example, switch from pay-by-bandwidth to pay-by-data-transfer), the new metering method and the other changes specified in the operation take effect at 00:00:00 the next day.
 *
 * @param request ModifyLoadBalancerInternetSpecRequest
 * @return ModifyLoadBalancerInternetSpecResponse
 */
async function modifyLoadBalancerInternetSpec(request: ModifyLoadBalancerInternetSpecRequest): ModifyLoadBalancerInternetSpecResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLoadBalancerInternetSpecWithOptions(request, runtime);
}

model ModifyLoadBalancerPayTypeRequest {
  autoPay?: boolean(name='AutoPay', description='Specifies whether to enable automatic payment. Valid values:

*   **true**: yes
*   **false** (default): no

>  This parameter is valid only when the `PayType` parameter is set to **PrePay**. This parameter is valid only for pay-as-you-go instances.', example='false'),
  duration?: int32(name='Duration', description='The subscription duration.

*   If **PricingCycle** is set to **month**, the valid values are **1** to **9**.
*   If **PricingCycle** is set to **year**, the valid values are **1** to **3**.

>  This parameter is valid only when the **PayType** parameter is set to **PrePay**. This parameter is valid only for pay-as-you-go instances.', example='1'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08ex*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  payType?: string(name='PayType', description='The billing method of the CLB instance. Valid values:

*   **PayOnDemand** (default): pay-as-you-go

To change the billing method of a pay-as-you-go CLB instance to subscription, you must set the parameter to **PrePay**. In addition, the previous billing method of the CLB instance must be **PayOnDemand**.', example='PrePay'),
  pricingCycle?: string(name='PricingCycle', description='The billing cycle.

Valid values: **year** and **month**.

>  This parameter is valid only when the **PayType** parameter is set to **PrePay**. This parameter is valid only for pay-as-you-go instances.', example='month'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ModifyLoadBalancerPayTypeResponseBody = {
  orderId?: long(name='OrderId', description='The order ID of the subscription CLB instance.', example='20212961978891'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model ModifyLoadBalancerPayTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyLoadBalancerPayTypeResponseBody(name='body'),
}

/**
 * @summary Changes the billing method of a Classic Load Balancer (CLB) instance from pay-as-you-go to subscription.
 *
 * @param request ModifyLoadBalancerPayTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyLoadBalancerPayTypeResponse
 */
async function modifyLoadBalancerPayTypeWithOptions(request: ModifyLoadBalancerPayTypeRequest, runtime: Util.RuntimeOptions): ModifyLoadBalancerPayTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoPay)) {
    query['AutoPay'] = request.autoPay;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLoadBalancerPayType',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Changes the billing method of a Classic Load Balancer (CLB) instance from pay-as-you-go to subscription.
 *
 * @param request ModifyLoadBalancerPayTypeRequest
 * @return ModifyLoadBalancerPayTypeResponse
 */
async function modifyLoadBalancerPayType(request: ModifyLoadBalancerPayTypeRequest): ModifyLoadBalancerPayTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLoadBalancerPayTypeWithOptions(request, runtime);
}

model ModifyVServerGroupBackendServersRequest {
  newBackendServers?: string(name='NewBackendServers', description='The list of new backend servers that you want to use to replace those in the vServer group. You can specify at most 20 backend servers for a vServer group in each call.

*   **ServerId**: required. The ID of the ECS instance or ENI that serves as a backend server. This parameter must be of the STRING type.

*   **Port**: required. The port that is used by the backend server. This parameter must be of the INTEGER type. Valid values: **1 to 65535**.

*   **Weight**: required. The weight of the backend server. This parameter must be of the INTEGER type. Valid values: **0 to 100**.

*   **Description**: optional. The description of the backend server. This parameter must be of the STRING type. The description can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

*   **Type**: the type of backend server. This parameter must be of the STRING type. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **ServerIp**: the IP address of the ECS instance or ENI.

Examples:

*   An ECS instance: `[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]`
*   An ENI: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }]`
*   An ENI with multiple IP addresses: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]`', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]'),
  oldBackendServers?: string(name='OldBackendServers', description='The list of backend servers that you want to replace in the vServer group. You can specify at most 20 backend servers for a vServer group in each call.

*   **ServerId**: required. The ID of the Elastic Compute Service (ECS) instance or elastic network interface (ENI) that serves as a backend server. This parameter must be of the STRING type.

*   **Port**: required. The port that is used by the backend server. This parameter must be of the INTEGER type. Valid values: **1 to 65535**.

*   **Weight**: required. The weight of the backend server. This parameter must be of the INTEGER type. Valid values: **0 to 100**.

*   **Description**: optional. The description of the backend server. This parameter must be of the STRING type. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

*   **Type**: the type of backend server. This parameter must be of the STRING type. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **ServerIp**: the IP address of the ECS instance or ENI.

Examples:

*   An ECS instance: `[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]`
*   An ENI: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }]`
*   An ENI with multiple IP addresses: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]`', example='[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs",  "Port":"80","Description":"test-112" }]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.

This parameter is required.', example='rsp-cige6j****'),
}

model ModifyVServerGroupBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the backend server.', example='Backend server description'),
      port?: int32(name='Port', description='The port that is used by the backend server.', example='70'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='i-bp1ge5hrp****'),
      type?: string(name='Type', description='The type of backend server. Valid values:

*   **ecs**: an ECS instance. This is the default value.
*   **eni**: an ENI.', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j****'),
}

model ModifyVServerGroupBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVServerGroupBackendServersResponseBody(name='body'),
}

/**
 * @summary Replaces backend servers in a specified vServer group.
 *
 * @description You can call this operation to replace the backend servers in a specified vServer group. To modify the configurations of the backend servers, such as their weights, you can call the [SetVServerGroupAttribute](https://help.aliyun.com/document_detail/35217.html) operation.
 *
 * @param request ModifyVServerGroupBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVServerGroupBackendServersResponse
 */
async function modifyVServerGroupBackendServersWithOptions(request: ModifyVServerGroupBackendServersRequest, runtime: Util.RuntimeOptions): ModifyVServerGroupBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.newBackendServers)) {
    query['NewBackendServers'] = request.newBackendServers;
  }
  if (!Util.isUnset(request.oldBackendServers)) {
    query['OldBackendServers'] = request.oldBackendServers;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVServerGroupBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Replaces backend servers in a specified vServer group.
 *
 * @description You can call this operation to replace the backend servers in a specified vServer group. To modify the configurations of the backend servers, such as their weights, you can call the [SetVServerGroupAttribute](https://help.aliyun.com/document_detail/35217.html) operation.
 *
 * @param request ModifyVServerGroupBackendServersRequest
 * @return ModifyVServerGroupBackendServersResponse
 */
async function modifyVServerGroupBackendServers(request: ModifyVServerGroupBackendServersRequest): ModifyVServerGroupBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVServerGroupBackendServersWithOptions(request, runtime);
}

model MoveResourceGroupRequest {
  newResourceGroupId?: string(name='NewResourceGroupId', description='The ID of the resource group to which you want to move the resource.

This parameter is required.', example='rg-aek2rpsek5h****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.

This parameter is required.', example='cn-beijing'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-aek2dmxj56z****'),
  resourceId?: string(name='ResourceId', description='The resource ID.

This parameter is required.', example='lb-uf6ghek7ds2btzt65****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **loadbalancer**: a CLB instance
*   **certificate**: a certificate
*   **acl**: an access control list (ACL)

This parameter is required.', example='loadbalancer'),
  accessKeyId?: string(name='access_key_id', description='The AccessKey ID provided by Alibaba Cloud.', example='LTAI5tPmFGUpmyWwD8gp****'),
}

model MoveResourceGroupResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='18CAE30A-79CF-544C-86DB-EB36C739642E'),
}

model MoveResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MoveResourceGroupResponseBody(name='body'),
}

/**
 * @summary Moves a resource to another resource group.
 *
 * @param request MoveResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return MoveResourceGroupResponse
 */
async function moveResourceGroupWithOptions(request: MoveResourceGroupRequest, runtime: Util.RuntimeOptions): MoveResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.newResourceGroupId)) {
    query['NewResourceGroupId'] = request.newResourceGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.accessKeyId)) {
    query['access_key_id'] = request.accessKeyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MoveResourceGroup',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Moves a resource to another resource group.
 *
 * @param request MoveResourceGroupRequest
 * @return MoveResourceGroupResponse
 */
async function moveResourceGroup(request: MoveResourceGroupRequest): MoveResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return moveResourceGroupWithOptions(request, runtime);
}

model RemoveAccessControlListEntryRequest {
  aclEntrys?: string(name='AclEntrys', description='The IP entries that you want to remove from the network ACL. Valid values:

*   **entry**: the IP address or CIDR block that you want to remove from the network ACL. Separate multiple IP addresses or CIDR blocks with commas (,).
*   **comment**: the description of the network ACL.', example='[{"entry":"10.0.10.0/24","comment":"privaterule1"}]'),
  aclId?: string(name='AclId', description='The ID of the network ACL.

This parameter is required.', example='acl-bp1l0kk4gxce43k******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the network ACL is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RemoveAccessControlListEntryResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='988CB45E-1643-48C0-87B4-928DDF77EA49'),
}

model RemoveAccessControlListEntryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveAccessControlListEntryResponseBody(name='body'),
}

/**
 * @summary Removes IP entries from the network access control list (ACL) of a Classic Load Balancer (CLB) instance.
 *
 * @param request RemoveAccessControlListEntryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveAccessControlListEntryResponse
 */
async function removeAccessControlListEntryWithOptions(request: RemoveAccessControlListEntryRequest, runtime: Util.RuntimeOptions): RemoveAccessControlListEntryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclEntrys)) {
    query['AclEntrys'] = request.aclEntrys;
  }
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveAccessControlListEntry',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes IP entries from the network access control list (ACL) of a Classic Load Balancer (CLB) instance.
 *
 * @param request RemoveAccessControlListEntryRequest
 * @return RemoveAccessControlListEntryResponse
 */
async function removeAccessControlListEntry(request: RemoveAccessControlListEntryRequest): RemoveAccessControlListEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAccessControlListEntryWithOptions(request, runtime);
}

model RemoveBackendServersRequest {
  backendServers?: string(name='BackendServers', description='The backend servers to be removed.

*   **ServerId**: The IDs of the backend servers. Set the value to a string. This parameter is required.

*   **Type**: The type of the backend server. Valid values:

    *   **ecs** (default): an Elastic Compute Service (ECS) instance

    <!---->

    *   **eni**: an elastic network interface (ENI)

*   **Weight**: the weight of the backend server. Valid values: **0** to **100**. Set the value to an integer.

You can remove at most 20 backend servers in each call. Examples:

*   Remove an ECS instance: `[{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]`
*   Remove an ENI: `[{"ServerId":"eni-2ze1sdp5****","Type": "eni","Weight":"100"}]`

This parameter is required.', example='[{"ServerId":"i-bp1fq61enf4loa5i****", "Type": "ecs","Weight":"100"}]'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp15lbk8uja8rvm4a****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RemoveBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the server group.', example='BackendServer1'),
      serverId?: string(name='ServerId', description='The ID of the backend server.', example='i-bp1fq61enf4loa5i****'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs**: an ECS instance
*   **eni**: an ENI', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server. Valid values: **0 to 100**.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp15lbk8uja8rvm4a****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model RemoveBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveBackendServersResponseBody(name='body'),
}

/**
 * @summary Removes backend servers.
 *
 * @description >  If the backend servers that you want to remove are not in the server list of the Classic Load Balancer (CLB) instance, the request fails. However, the system does not report an error.
 *
 * @param request RemoveBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveBackendServersResponse
 */
async function removeBackendServersWithOptions(request: RemoveBackendServersRequest, runtime: Util.RuntimeOptions): RemoveBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes backend servers.
 *
 * @description >  If the backend servers that you want to remove are not in the server list of the Classic Load Balancer (CLB) instance, the request fails. However, the system does not report an error.
 *
 * @param request RemoveBackendServersRequest
 * @return RemoveBackendServersResponse
 */
async function removeBackendServers(request: RemoveBackendServersRequest): RemoveBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeBackendServersWithOptions(request, runtime);
}

model RemoveListenerWhiteListItemRequest {
  listenerPort?: int32(name='ListenerPort', description='The listening port.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.

>  This parameter is required when listeners that use different protocols listen on the same port.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-8vb86hxixo8lvsja8****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the Classic Load Balancer (CLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sourceItems?: string(name='SourceItems', description='The list of IP addresses or CIDR blocks that you want to remove from the whitelist. Separate multiple IP addresses or CIDR blocks with commas (,).

>  If all IP addresses are removed from the whitelist, the listener does not forward requests.

This parameter is required.', example='192.168.XX.XX'),
}

model RemoveListenerWhiteListItemResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model RemoveListenerWhiteListItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveListenerWhiteListItemResponseBody(name='body'),
}

/**
 * @summary Removes IP addresses or CIDR blocks from the whitelist of a listener.
 *
 * @param request RemoveListenerWhiteListItemRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveListenerWhiteListItemResponse
 */
async function removeListenerWhiteListItemWithOptions(request: RemoveListenerWhiteListItemRequest, runtime: Util.RuntimeOptions): RemoveListenerWhiteListItemResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.sourceItems)) {
    query['SourceItems'] = request.sourceItems;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveListenerWhiteListItem',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes IP addresses or CIDR blocks from the whitelist of a listener.
 *
 * @param request RemoveListenerWhiteListItemRequest
 * @return RemoveListenerWhiteListItemResponse
 */
async function removeListenerWhiteListItem(request: RemoveListenerWhiteListItemRequest): RemoveListenerWhiteListItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeListenerWhiteListItemWithOptions(request, runtime);
}

model RemoveTagsRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='139a00604ad-cn-east-hangzhou-01'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the SLB instance belongs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='A list of tags to be removed.

This parameter is required.', example='[{"TagKey":"Key1","TagValue":"Value1"},{"TagKey":"Key2","TagValue":"Value2"}]'),
}

model RemoveTagsResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model RemoveTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveTagsResponseBody(name='body'),
}

/**
 * @param request RemoveTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveTagsResponse
 */
async function removeTagsWithOptions(request: RemoveTagsRequest, runtime: Util.RuntimeOptions): RemoveTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveTags',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RemoveTagsRequest
 * @return RemoveTagsResponse
 */
async function removeTags(request: RemoveTagsRequest): RemoveTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeTagsWithOptions(request, runtime);
}

model RemoveVServerGroupBackendServersRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers that you want to remove from the vServer group.

You can specify at most 20 backend servers for a vServer group in each call.

The value of this parameter is a JSON list of the STRING type. You can specify at most 20 elements in a list for each request.

*   **ServerId**: the ID of the Elastic Compute Service (ECS) instance or elastic network interface (ENI) that serves as a backend server.

*   **Port**: the port that is used by the backend server. Valid values: **1 to 65535**.

*   **Weight**: the weight of the backend server. Valid values: **0 to 100**.

*   **Description**: the description of the backend server. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

*   **Type**: the type of backend server. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **ServerIp**: the IP address of the ECS instance or ENI.

This parameter is required.', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.

This parameter is required.', example='rsp-cige6****'),
}

model RemoveVServerGroupBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      port?: int32(name='Port', description='The port that is used by the backend server.', example='80'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='vm-230'),
      type?: string(name='Type', description='The type of backend server. Valid values:

*   **ecs**: an ECS instance
*   **eni**: an ENI', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j****'),
}

model RemoveVServerGroupBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveVServerGroupBackendServersResponseBody(name='body'),
}

/**
 * @summary Removes one or more backend servers from a specified vServer group.
 *
 * @description >  If one or more backend servers specified by the **BackendServers** parameter do not exist in the specified vServer group, these backend servers are ignored and no error message is returned.
 *
 * @param request RemoveVServerGroupBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveVServerGroupBackendServersResponse
 */
async function removeVServerGroupBackendServersWithOptions(request: RemoveVServerGroupBackendServersRequest, runtime: Util.RuntimeOptions): RemoveVServerGroupBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveVServerGroupBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes one or more backend servers from a specified vServer group.
 *
 * @description >  If one or more backend servers specified by the **BackendServers** parameter do not exist in the specified vServer group, these backend servers are ignored and no error message is returned.
 *
 * @param request RemoveVServerGroupBackendServersRequest
 * @return RemoveVServerGroupBackendServersResponse
 */
async function removeVServerGroupBackendServers(request: RemoveVServerGroupBackendServersRequest): RemoveVServerGroupBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeVServerGroupBackendServersWithOptions(request, runtime);
}

model SetAccessControlListAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the network ACL.

This parameter is required.', example='acl-bp1l0kk4gxce43kzet04s'),
  aclName?: string(name='AclName', description='The new name of the network ACL. The name must be 1 to 80 characters in length, and can contain only letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of the network ACL must be unique within each region.

This parameter is required.', example='test1'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the network ACL is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetAccessControlListAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='988CB45E-1643-48C0-87B4-928DDF77EA49'),
}

model SetAccessControlListAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetAccessControlListAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the name of a network access control list (ACL).
 *
 * @param request SetAccessControlListAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetAccessControlListAttributeResponse
 */
async function setAccessControlListAttributeWithOptions(request: SetAccessControlListAttributeRequest, runtime: Util.RuntimeOptions): SetAccessControlListAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclName)) {
    query['AclName'] = request.aclName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetAccessControlListAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the name of a network access control list (ACL).
 *
 * @param request SetAccessControlListAttributeRequest
 * @return SetAccessControlListAttributeResponse
 */
async function setAccessControlListAttribute(request: SetAccessControlListAttributeRequest): SetAccessControlListAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAccessControlListAttributeWithOptions(request, runtime);
}

model SetAccessLogsDownloadAttributeRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1b6c719dfa08ex*****'),
  logsDownloadAttributes?: string(name='LogsDownloadAttributes', description='The access log forwarding rule. Parameters:

*   **LogProject**: the name of the project.
*   **LogStore**: the name of the Logstore.
*   **LoadBalancerId**: the ID of the CLB instance.

This parameter is required.', example='[{"logProject":"my-project", "LogStore":"my-log-store", "LoadBalancerId":"lb-uf68ps3rekbljmdb0****"}]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tags?: string(name='Tags', description='The tags that are added to the CLB instance. The tags must be key-value pairs that are contained in a JSON dictionary.

You can specify up to 10 tags in each call.', example='[{"tagKey":"Key1","tagValue":"Value1"}]'),
}

model SetAccessLogsDownloadAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9C****'),
}

model SetAccessLogsDownloadAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetAccessLogsDownloadAttributeResponseBody(name='body'),
}

/**
 * @summary Adds an access log forwarding rule for a Classic Load Balancer (CLB) instance.
 *
 * @param request SetAccessLogsDownloadAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetAccessLogsDownloadAttributeResponse
 */
async function setAccessLogsDownloadAttributeWithOptions(request: SetAccessLogsDownloadAttributeRequest, runtime: Util.RuntimeOptions): SetAccessLogsDownloadAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.logsDownloadAttributes)) {
    query['LogsDownloadAttributes'] = request.logsDownloadAttributes;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetAccessLogsDownloadAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Adds an access log forwarding rule for a Classic Load Balancer (CLB) instance.
 *
 * @param request SetAccessLogsDownloadAttributeRequest
 * @return SetAccessLogsDownloadAttributeResponse
 */
async function setAccessLogsDownloadAttribute(request: SetAccessLogsDownloadAttributeRequest): SetAccessLogsDownloadAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAccessLogsDownloadAttributeWithOptions(request, runtime);
}

model SetBackendServersRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers that you want to modify.

The value of this parameter must be a STRING list in the JSON format. You can specify up to 20 elements in each request.

*   **ServerId**: Required. Specify the ID of the backend server. This parameter must be of the STRING type.

*   **Port**: Required. Specify the port that is used by the backend server. This parameter must be of the INTEGER type. Valid values: **1** to **65535**.

*   **Weight**: Specify the weight of the backend server. This parameter must be of the INTEGER type. Valid values: **0** to **100**.

*   **Description**: Optional. The description of the backend server. This value must be a string. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

*   **Type**: the type of backend server. This parameter must be of the STRING type. Valid values:

    *   **ecs** (default): an Elastic Compute Service (ECS) instance
    *   **eni**: an elastic network interface (ENI). You can specify ENIs as the backend servers only for high-performance CLB instances.

*   **ServerIp**: the IP address of the ECS instance or ENI

Examples:

*   ECS instance: `[{ "ServerId": "ecs-******FmYAXG", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]`
*   ENI: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }]`
*   ENI with multiple IP addresses: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]`

> 
*   The backend servers must be in the Running state. You can specify up to 20 backend servers in each request.', example='[{ "ServerId": "ecs-******FmYAXG", "Weight": "100", "Type": "ecs",  "Port":"80","Description":"test-112" }]'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1qjwo61pqz3a******'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetBackendServersResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the backend server.', example='backend server'),
      serverId?: string(name='ServerId', description='The ID of the server.', example='eni-hhshhs****'),
      type?: string(name='Type', description='The type of the backend server. Valid values:

*   **ecs** (default): an ECS instance
*   **eni**: an elastic network interface (ENI)', example='eni'),
      weight?: string(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.', example='lb-bp1qjwo61pqz3a******'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
}

model SetBackendServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetBackendServersResponseBody(name='body'),
}

/**
 * @summary Sets the weights of backend servers.
 *
 * @param request SetBackendServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetBackendServersResponse
 */
async function setBackendServersWithOptions(request: SetBackendServersRequest, runtime: Util.RuntimeOptions): SetBackendServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetBackendServers',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Sets the weights of backend servers.
 *
 * @param request SetBackendServersRequest
 * @return SetBackendServersResponse
 */
async function setBackendServers(request: SetBackendServersRequest): SetBackendServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return setBackendServersWithOptions(request, runtime);
}

model SetCACertificateNameRequest {
  CACertificateId?: string(name='CACertificateId', description='The ID of the CA certificate.

This parameter is required.', example='139a00604ad-cn-east-hangzhou-01'),
  CACertificateName?: string(name='CACertificateName', description='The name of the CA certificate.

The name must be 1 to 80 characters in length and start with an English letter or a Chinese character. It can contain numbers, underscores (_), periods (.), and hyphens (-).

This parameter is required.', example='mycacert02'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region to which the CA certificate belongs.

To query the region ID, call [DescribeRegions](https://help.aliyun.com/document_detail/27584.html).

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetCACertificateNameResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FE7BA984'),
}

model SetCACertificateNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetCACertificateNameResponseBody(name='body'),
}

/**
 * @summary Sets the name of a CA Certificate.
 *
 * @param request SetCACertificateNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetCACertificateNameResponse
 */
async function setCACertificateNameWithOptions(request: SetCACertificateNameRequest, runtime: Util.RuntimeOptions): SetCACertificateNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.CACertificateId)) {
    query['CACertificateId'] = request.CACertificateId;
  }
  if (!Util.isUnset(request.CACertificateName)) {
    query['CACertificateName'] = request.CACertificateName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCACertificateName',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Sets the name of a CA Certificate.
 *
 * @param request SetCACertificateNameRequest
 * @return SetCACertificateNameResponse
 */
async function setCACertificateName(request: SetCACertificateNameRequest): SetCACertificateNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCACertificateNameWithOptions(request, runtime);
}

model SetDomainExtensionAttributeRequest {
  domainExtensionId?: string(name='DomainExtensionId', description='The ID of the domain name that is associated with the additional certificate to be replaced.

This parameter is required.', example='de-bp1rp7ta*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the SLB instance is created.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the new certificate.', example='1231579xxxxxxxx_166f8204689_1714763408_709981xxx'),
}

model SetDomainExtensionAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='149A2470-F010-4437-BF68-343D5099C19D'),
}

model SetDomainExtensionAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDomainExtensionAttributeResponseBody(name='body'),
}

/**
 * @summary Replaces an additional certificate.
 *
 * @description >  You cannot replace an additional certificate for a listener that is added to a shared-resource Server Load Balancer (SLB) instance.
 *
 * @param request SetDomainExtensionAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDomainExtensionAttributeResponse
 */
async function setDomainExtensionAttributeWithOptions(request: SetDomainExtensionAttributeRequest, runtime: Util.RuntimeOptions): SetDomainExtensionAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainExtensionId)) {
    query['DomainExtensionId'] = request.domainExtensionId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDomainExtensionAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Replaces an additional certificate.
 *
 * @description >  You cannot replace an additional certificate for a listener that is added to a shared-resource Server Load Balancer (SLB) instance.
 *
 * @param request SetDomainExtensionAttributeRequest
 * @return SetDomainExtensionAttributeResponse
 */
async function setDomainExtensionAttribute(request: SetDomainExtensionAttributeRequest): SetDomainExtensionAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDomainExtensionAttributeWithOptions(request, runtime);
}

model SetListenerAccessControlStatusRequest {
  accessControlStatus?: string(name='AccessControlStatus', description='Specifies whether to enable the whitelist. Valid values:

*   **open_white_list**: enables the whitelist.
*   **close**: disables the whitelist.

>  After the whitelist is enabled, if no IP address is added to the whitelist, the CLB instance does not distribute network traffic.

This parameter is required.', example='open_white_list'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1 to 65535**.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend protocol that is used by the CLB instance.

>  This parameter is required when listeners that use different protocols listen on the same port.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-8vb86hxixo8lvsja8****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the Classic Load Balancer (CLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetListenerAccessControlStatusResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetListenerAccessControlStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetListenerAccessControlStatusResponseBody(name='body'),
}

/**
 * @summary Enables or disables the whitelist of a specified listener.
 *
 * @param request SetListenerAccessControlStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetListenerAccessControlStatusResponse
 */
async function setListenerAccessControlStatusWithOptions(request: SetListenerAccessControlStatusRequest, runtime: Util.RuntimeOptions): SetListenerAccessControlStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accessControlStatus)) {
    query['AccessControlStatus'] = request.accessControlStatus;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetListenerAccessControlStatus',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables or disables the whitelist of a specified listener.
 *
 * @param request SetListenerAccessControlStatusRequest
 * @return SetListenerAccessControlStatusResponse
 */
async function setListenerAccessControlStatus(request: SetListenerAccessControlStatusRequest): SetListenerAccessControlStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return setListenerAccessControlStatusWithOptions(request, runtime);
}

model SetLoadBalancerDeleteProtectionRequest {
  deleteProtection?: string(name='DeleteProtection', description='Specify whether to enable or disable deletion protection for the SLB instance.

Valid values: **on and off**.

This parameter is required.', example='off'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08e*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the SLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query region IDs.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetLoadBalancerDeleteProtectionResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='791D8B68-AE0F-4174-AF54-088C8B3C5D54'),
}

model SetLoadBalancerDeleteProtectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerDeleteProtectionResponseBody(name='body'),
}

/**
 * @summary Enables or disables deletion protection for an SLB instance.
 *
 * @param request SetLoadBalancerDeleteProtectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerDeleteProtectionResponse
 */
async function setLoadBalancerDeleteProtectionWithOptions(request: SetLoadBalancerDeleteProtectionRequest, runtime: Util.RuntimeOptions): SetLoadBalancerDeleteProtectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deleteProtection)) {
    query['DeleteProtection'] = request.deleteProtection;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerDeleteProtection',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Enables or disables deletion protection for an SLB instance.
 *
 * @param request SetLoadBalancerDeleteProtectionRequest
 * @return SetLoadBalancerDeleteProtectionResponse
 */
async function setLoadBalancerDeleteProtection(request: SetLoadBalancerDeleteProtectionRequest): SetLoadBalancerDeleteProtectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerDeleteProtectionWithOptions(request, runtime);
}

model SetLoadBalancerHTTPListenerAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the access control list (ACL) that is associated with the listener.

> This parameter is required when **AclStatus** is set to **on**.', example='123'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**
*   **off**', example='off'),
  aclType?: string(name='AclType', description='The type of the ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Risks may occur if a whitelist is improperly configured. If a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

If a blacklist is configured for a listener but no IP addresses are added to the blacklist, the listener forwards all requests.

> This parameter takes effect when the value of **AclStatus** is set to **on**.', example='white'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Set the value to

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, this value specifies that the bandwidth of the listener is unlimited.', example='-1'),
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.

The cookie must be 1 to 200 characters in length, and can contain ASCII characters and digits. It cannot contain commas (,), semicolons (;), or spaces. It cannot start with a dollar sign ($).

> This parameter is required when **StickySession** is set to **on** and **StickySessionType** is set to **server**.', example='B490B5EBF6F3CD402E515D22BCDA****'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie.

Valid values: **1** to **86400**. Unit: seconds.

> This parameter is required when **StickySession** is set to **on** and **StickySessionType** is set to **insert**.', example='500'),
  description?: string(name='Description', description='The description of the listener.', example='test'),
  gzip?: string(name='Gzip', description='Specifies whether to enable `GZIP` compression to compress specific types of files. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable the health check feature. Valid values:

*   **on**
*   **off**', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.

> This parameter takes effect only if you set **HealthCheck** to **on**.', example='8080'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you specify \\\\*\\\\*$_ip **or** ignore HealthCheckDomain\\\\*\\\\*, CLB uses the private IP addresses of backend servers as the health check domain names.
*   **domain**: The domain name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), and hyphens (-).

> The parameter takes effect only if you set **HealthCheck** to **on**.', example='172.XX.XX.16'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,).

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  The parameter takes effect only if you set **HealthCheck** to **on**.', example='http_2xx,http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed.

Valid values: **1** to **50**. Unit: seconds.

>  The parameter takes effect only if you set **HealthCheck** to **on**.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The health check method that is used in HTTP health checks. Valid values: **head** and **get**.

> The parameter takes effect only if you set **HealthCheck** to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend server, such as an Elastic Compute Service (ECS) instance, does not respond to a probe packet within the specified timeout period, the server fails the health check. This parameter takes effect only if you set **HealthCheck** to **on**.

Valid values: **1** to **300**. Unit: seconds.

> If the value of **HealthCheckTimeout** is smaller than the value of **HealthCheckInterval**, the value of **HealthCheckTimeout** becomes invalid and the value of **HealthCheckInterval** is used as the timeout period.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The Uniform Resource Identifier (URI) that you want to use for health checks.

The URI must be 1 to 80 characters in length, and can contain letters, digits, and the following characters: - / . % ? # & The URI must start with a forward slash (/) but cannot be a single forward slash (/).

> The parameter takes effect only if you set **HealthCheck** to **on**.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.

> The parameter takes effect only if you set **HealthCheck** to **on**.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds. Valid values: **1 to 60**. Default value: **15**.

If no request is received within the specified timeout period, CLB closes the connection. When a request is received, CLB establishes a new connection.', example='12'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The CLB instance ID.

This parameter is required.', example='lb-bp1qjwo61pqz3ah*****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/27585.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation.', example='cn-hangzhou'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Unit: seconds. Valid values: **1 to 180**. Default value: **60**.

If no response is received from the backend server within the request timeout period, CLB returns an HTTP 504 error code to the client.', example='3'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence. Valid values:

*   **on**
*   **off**', example='on'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie.

CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response packet that is sent to a client. The next request from the client contains this cookie, and the listener distributes the request to the recorded backend server.

*   **server**: rewrites a cookie.

When CLB detects a user-defined cookie, CLB overwrites the original cookie with the user-defined cookie. The next request from the client carries the user-defined cookie, and the listener forwards the request to the recorded backend server.

> This parameter is required when **StickySession** is set to **on**.', example='insert'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.

> The parameter takes effect only if you set **HealthCheck** to **on**.', example='4'),
  VServerGroup?: string(name='VServerGroup', description='Specifies whether to use a vServer group. Valid values:

*   **on**
*   **off**', example='on'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j*****'),
  XForwardedFor?: string(name='XForwardedFor', description='Specifies whether to use the `X-Forwarded-For` header to preserve client IP addresses. Valid values:

*   **on** (default)
*   **off**', example='on'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Specifies whether to use the `XForwardedFor_ClientSrcPort` header to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Specifies whether to use the `SLB-ID` header to retrieve the ID of the CLB instance. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Specifies whether to use the `SLB-IP` header to retrieve the virtual IP address (VIP) requested by the client. Valid values:

*   **on**
*   **off**', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Specifies whether to use the `XForwardedFor_SLBPORT` header to retrieve the listener port of the CLB instance. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Specifies whether to use the `X-Forwarded-Proto` header to retrieve the listener protocol. Valid values:

*   **on**
*   **off**', example='on'),
}

model SetLoadBalancerHTTPListenerAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerHTTPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerHTTPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of an HTTP listener.
 *
 * @description ### Prerequisites
 * *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTP listener is created. For more information about how to create an HTTP listener, see [CreateLoadBalancerHTTPListener](https://help.aliyun.com/document_detail/27592.html).
 *
 * @param request SetLoadBalancerHTTPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerHTTPListenerAttributeResponse
 */
async function setLoadBalancerHTTPListenerAttributeWithOptions(request: SetLoadBalancerHTTPListenerAttributeRequest, runtime: Util.RuntimeOptions): SetLoadBalancerHTTPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.cookie)) {
    query['Cookie'] = request.cookie;
  }
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.gzip)) {
    query['Gzip'] = request.gzip;
  }
  if (!Util.isUnset(request.healthCheck)) {
    query['HealthCheck'] = request.healthCheck;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckMethod)) {
    query['HealthCheckMethod'] = request.healthCheckMethod;
  }
  if (!Util.isUnset(request.healthCheckTimeout)) {
    query['HealthCheckTimeout'] = request.healthCheckTimeout;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.idleTimeout)) {
    query['IdleTimeout'] = request.idleTimeout;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestTimeout)) {
    query['RequestTimeout'] = request.requestTimeout;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  if (!Util.isUnset(request.stickySessionType)) {
    query['StickySessionType'] = request.stickySessionType;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroup)) {
    query['VServerGroup'] = request.VServerGroup;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.XForwardedFor)) {
    query['XForwardedFor'] = request.XForwardedFor;
  }
  if (!Util.isUnset(request.XForwardedFor_ClientSrcPort)) {
    query['XForwardedFor_ClientSrcPort'] = request.XForwardedFor_ClientSrcPort;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBID)) {
    query['XForwardedFor_SLBID'] = request.XForwardedFor_SLBID;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBIP)) {
    query['XForwardedFor_SLBIP'] = request.XForwardedFor_SLBIP;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBPORT)) {
    query['XForwardedFor_SLBPORT'] = request.XForwardedFor_SLBPORT;
  }
  if (!Util.isUnset(request.XForwardedFor_proto)) {
    query['XForwardedFor_proto'] = request.XForwardedFor_proto;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerHTTPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configurations of an HTTP listener.
 *
 * @description ### Prerequisites
 * *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTP listener is created. For more information about how to create an HTTP listener, see [CreateLoadBalancerHTTPListener](https://help.aliyun.com/document_detail/27592.html).
 *
 * @param request SetLoadBalancerHTTPListenerAttributeRequest
 * @return SetLoadBalancerHTTPListenerAttributeResponse
 */
async function setLoadBalancerHTTPListenerAttribute(request: SetLoadBalancerHTTPListenerAttributeRequest): SetLoadBalancerHTTPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerHTTPListenerAttributeWithOptions(request, runtime);
}

model SetLoadBalancerHTTPSListenerAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the network access control list (ACL) that you want to associate with the listener.

If **AclStatus** is set to **on**, this parameter is required.', example='nacl-a2do9e413e0spzasx****'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: enables access control
*   **off**: disables access control', example='off'),
  aclType?: string(name='AclType', description='The type of network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your business may be adversely affected if the whitelist is not set properly. After a whitelist is configured, only IP addresses in the whitelist can access the CLB listener.

    If no IP address is added to the whitelist, the CLB listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are denied. Blacklists apply to scenarios where you want to deny access from specified IP addresses to an application.

    If no IP address is added to the blacklist, the listener forwards all requests.

>  This parameter takes effect only when **AclStatus** is set to **on**.', example='white'),
  bandwidth?: int32(name='Bandwidth', description='The bandwidth limit of the listener. Unit: Mbit/s.

Valid values: **-1** and **1** to **5120**.

*   **-1**: If you set the value to -1, the bandwidth of the listener is unlimited.
*   **1** to **5120**: If you set a value from 1 to 5120, the value that you specify equals the bandwidth limit of the listener. The sum of bandwidth limit values that you specify for all listeners of the CLB instance cannot exceed the bandwidth limit of the CLB instance.', example='-1'),
  CACertificateId?: string(name='CACertificateId', description='The ID of the CA certificate.

*   If both the CA certificate and the server certificate are uploaded, mutual authentication is used.
*   If you upload only the server certificate, one-way authentication is used.', example='139a00604ad-cn-east-****'),
  cookie?: string(name='Cookie', description='The cookie to be configured on the backend server.

The cookie must be 1 to 200 characters in length, and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($).

>  This parameter is required if the **StickySession** parameter is set to **on** and the **StickySessionType** parameter is set to **server**.', example='B490B5EBF6F3CD4****'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of the cookie. Unit: seconds.

Valid values: **1** to **86400**.

>  This parameter is required if the **StickySession** parameter is set to **on** and the **StickySessionType** parameter is set to **insert**.', example='500'),
  description?: string(name='Description', description='The description of the listener.', example='Listener1'),
  enableHttp2?: string(name='EnableHttp2', description='Specifies whether to use `HTTP 2.0`. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  gzip?: string(name='Gzip', description='Specifies whether to enable `Gzip` compression to compress specific types of files. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable health checks. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='8080'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you do not set this parameter or set the parameter to $_ip, the CLB instance uses the private IP address of each backend server as the domain name for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length, and can contain letters, digits, periods (.),and hyphens (-).

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='172.XX.XX.16'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code of a successful health check. Separate multiple HTTP status codes with commas (,).

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='http_2xx,http_3xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='5'),
  healthCheckMethod?: string(name='HealthCheckMethod', description='The HTTP method that is used for health checks. Valid values: **head** and **get**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='get'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend server does not respond within the specified timeout period, the health check fails. Unit: seconds.

Valid values: **1** to **300**.

If the value of the **HealthCheckTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the timeout period specified by the **HealthCheckTimeout** parameter is ignored and the period of time specified by the **HealthCheckInterval** parameter is used as the timeout period.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='3'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URL that is used for health checks.

The URL must be 1 to 80 characters in length and can contain letters, digits, and the following characters: - / . % ? # &. The URL must not be a single forward slash (/) but it must start with a forward slash (/).

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy (from **fail** to **success**).

Valid values: **2** to **10**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='4'),
  idleTimeout?: int32(name='IdleTimeout', description='The timeout period of an idle connection. Unit: seconds. Valid values: **1 to 60**. Default value: **15**.

If no request is received within the specified timeout period, CLB closes the connection. When another request is received, CLB establishes a new connection.', example='23'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port that is used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-sjhfdji****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.', example='cn-hangzhou'),
  requestTimeout?: int32(name='RequestTimeout', description='The timeout period of a request. Unit: seconds. Valid values: **1 to 180**. Default value: **60**.

If no response is received from the backend server during the request timeout period, CLB sends an HTTP 504 error code to the client.', example='223'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.', example='wrr'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='idkp-123-cn-te****'),
  stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie.

    CLB inserts a cookie (SERVERID) into the first HTTP or HTTPS response that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client will contain the user-defined cookie, and the listener will distribute this request to the recorded backend server.

>  This parameter is required if the **StickySession** parameter is set to **on**.', example='insert'),
  TLSCipherPolicy?: string(name='TLSCipherPolicy', description='The Transport Layer Security (TLS) security policy. Each security policy contains TLS protocol versions and cipher suites available for HTTPS.

*   **tls_cipher_policy_1_0**:

    Supported TLS versions: TLS 1.0, TLS 1.1, and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_1**:

    Supported TLS versions: TLS 1.1 and TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, AES128-GCM-SHA256, AES256-GCM-SHA384, AES128-SHA256, AES256-SHA256, ECDHE-RSA-AES128-SHA, ECDHE-RSA-AES256-SHA, AES128-SHA, AES256-SHA, and DES-CBC3-SHA

*   **tls_cipher_policy_1_2_strict**

    Supported TLS version: TLS 1.2

    Supported cipher suites: ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA

*   **tls_cipher_policy_1_2_strict_with_1_3**

    Supported TLS versions: TLS 1.2 and TLS 1.3

    Supported cipher suites: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES128-SHA256, ECDHE-ECDSA-AES256-SHA384, ECDHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, ECDHE-ECDSA-AES128-SHA, ECDHE-ECDSA-AES256-SHA, ECDHE-RSA-AES128-SHA, and ECDHE-RSA-AES256-SHA', example='tls_cipher_policy_1_2'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy (from **success** to **fail**).

Valid values: **2** to **10**.

>  This parameter takes effect only when the **HealthCheck** parameter is set to **on**.', example='4'),
  VServerGroup?: string(name='VServerGroup', description='Specifies whether to use a vServer group. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j****'),
  XForwardedFor?: string(name='XForwardedFor', description='Specifies whether to use the `X-Forwarded-For` header to retrieve client IP addresses. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_ClientSrcPort?: string(name='XForwardedFor_ClientSrcPort', description='Specifies whether to use the `XForwardedFor_ClientSrcPort` header to retrieve the client port. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_SLBID?: string(name='XForwardedFor_SLBID', description='Specifies whether to use the `SLB-ID` header to retrieve the ID of the CLB instance. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_SLBIP?: string(name='XForwardedFor_SLBIP', description='Specifies whether to use the `SLB-IP` header to obtain the virtual IP address (VIP) requested by the client. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  XForwardedFor_SLBPORT?: string(name='XForwardedFor_SLBPORT', description='Specifies whether to use the `XForwardedFor_SLBPORT` header to retrieve the listener port of the CLB instance. Valid values:

*   **on**
*   **off**', example='off'),
  XForwardedFor_proto?: string(name='XForwardedFor_proto', description='Specifies whether to use the `X-Forwarded-Proto` header to retrieve the listener protocol. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
}

model SetLoadBalancerHTTPSListenerAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerHTTPSListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerHTTPSListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of an HTTPS listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTPS listener is created. For more information about how to create an HTTPS listener, see [CreateLoadBalancerHTTPSListener](https://help.aliyun.com/document_detail/27593.html).
 *
 * @param request SetLoadBalancerHTTPSListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerHTTPSListenerAttributeResponse
 */
async function setLoadBalancerHTTPSListenerAttributeWithOptions(request: SetLoadBalancerHTTPSListenerAttributeRequest, runtime: Util.RuntimeOptions): SetLoadBalancerHTTPSListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.CACertificateId)) {
    query['CACertificateId'] = request.CACertificateId;
  }
  if (!Util.isUnset(request.cookie)) {
    query['Cookie'] = request.cookie;
  }
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.enableHttp2)) {
    query['EnableHttp2'] = request.enableHttp2;
  }
  if (!Util.isUnset(request.gzip)) {
    query['Gzip'] = request.gzip;
  }
  if (!Util.isUnset(request.healthCheck)) {
    query['HealthCheck'] = request.healthCheck;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckMethod)) {
    query['HealthCheckMethod'] = request.healthCheckMethod;
  }
  if (!Util.isUnset(request.healthCheckTimeout)) {
    query['HealthCheckTimeout'] = request.healthCheckTimeout;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.idleTimeout)) {
    query['IdleTimeout'] = request.idleTimeout;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestTimeout)) {
    query['RequestTimeout'] = request.requestTimeout;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  if (!Util.isUnset(request.stickySessionType)) {
    query['StickySessionType'] = request.stickySessionType;
  }
  if (!Util.isUnset(request.TLSCipherPolicy)) {
    query['TLSCipherPolicy'] = request.TLSCipherPolicy;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroup)) {
    query['VServerGroup'] = request.VServerGroup;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.XForwardedFor)) {
    query['XForwardedFor'] = request.XForwardedFor;
  }
  if (!Util.isUnset(request.XForwardedFor_ClientSrcPort)) {
    query['XForwardedFor_ClientSrcPort'] = request.XForwardedFor_ClientSrcPort;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBID)) {
    query['XForwardedFor_SLBID'] = request.XForwardedFor_SLBID;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBIP)) {
    query['XForwardedFor_SLBIP'] = request.XForwardedFor_SLBIP;
  }
  if (!Util.isUnset(request.XForwardedFor_SLBPORT)) {
    query['XForwardedFor_SLBPORT'] = request.XForwardedFor_SLBPORT;
  }
  if (!Util.isUnset(request.XForwardedFor_proto)) {
    query['XForwardedFor_proto'] = request.XForwardedFor_proto;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerHTTPSListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configurations of an HTTPS listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   An HTTPS listener is created. For more information about how to create an HTTPS listener, see [CreateLoadBalancerHTTPSListener](https://help.aliyun.com/document_detail/27593.html).
 *
 * @param request SetLoadBalancerHTTPSListenerAttributeRequest
 * @return SetLoadBalancerHTTPSListenerAttributeResponse
 */
async function setLoadBalancerHTTPSListenerAttribute(request: SetLoadBalancerHTTPSListenerAttributeRequest): SetLoadBalancerHTTPSListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerHTTPSListenerAttributeWithOptions(request, runtime);
}

model SetLoadBalancerModificationProtectionRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08e*****'),
  modificationProtectionReason?: string(name='ModificationProtectionReason', description='The reason why the configuration read-only mode is enabled. The value must be 1 to 80 characters in length. It must start with a letter and can contain letters, digits, periods (.), underscores (_), and hyphens (-).

>  This parameter is valid only if the **ModificationProtectionStatus** parameter is set to **ConsoleProtection**.', example='Configuration change'),
  modificationProtectionStatus?: string(name='ModificationProtectionStatus', description='Specifies whether to enable the configuration read-only mode. Valid values:

*   **NonProtection**: disables the configuration read-only mode. After you disable the configuration read-only mode, the value of **ModificationProtectionReason** is cleared.
*   **ConsoleProtection**: enables the configuration read-only mode.

>  If you set this parameter to **ConsoleProtection**, you cannot use the CLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

This parameter is required.', example='ConsoleProtection'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetLoadBalancerModificationProtectionResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='791D8B68-AE0F-4174-AF54-088C8B3C5D54'),
}

model SetLoadBalancerModificationProtectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerModificationProtectionResponseBody(name='body'),
}

/**
 * @summary Modifies the configuration of the configuration read-only mode for a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerModificationProtectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerModificationProtectionResponse
 */
async function setLoadBalancerModificationProtectionWithOptions(request: SetLoadBalancerModificationProtectionRequest, runtime: Util.RuntimeOptions): SetLoadBalancerModificationProtectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.modificationProtectionReason)) {
    query['ModificationProtectionReason'] = request.modificationProtectionReason;
  }
  if (!Util.isUnset(request.modificationProtectionStatus)) {
    query['ModificationProtectionStatus'] = request.modificationProtectionStatus;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerModificationProtection',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configuration of the configuration read-only mode for a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerModificationProtectionRequest
 * @return SetLoadBalancerModificationProtectionResponse
 */
async function setLoadBalancerModificationProtection(request: SetLoadBalancerModificationProtectionRequest): SetLoadBalancerModificationProtectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerModificationProtectionWithOptions(request, runtime);
}

model SetLoadBalancerNameRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08e******'),
  loadBalancerName?: string(name='LoadBalancerName', description='The new name of the CLB instance.

The name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

This parameter is required.', example='test1'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetLoadBalancerNameResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerNameResponseBody(name='body'),
}

/**
 * @summary Modifies the name of a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerNameResponse
 */
async function setLoadBalancerNameWithOptions(request: SetLoadBalancerNameRequest, runtime: Util.RuntimeOptions): SetLoadBalancerNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerName)) {
    query['LoadBalancerName'] = request.loadBalancerName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerName',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the name of a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerNameRequest
 * @return SetLoadBalancerNameResponse
 */
async function setLoadBalancerName(request: SetLoadBalancerNameRequest): SetLoadBalancerNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerNameWithOptions(request, runtime);
}

model SetLoadBalancerStatusRequest {
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1b6c719dfa08e******'),
  loadBalancerStatus?: string(name='LoadBalancerStatus', description='The state of the CLB instance. Valid values: **active** and **inactive**.

*   **active** (default)

    If a CLB instance is in the **active** state, listeners of the CLB instance can forward traffic based on forwarding rules.

    By default, newly created CLB instances are in the **active** state.

*   **inactive**

    If a CLB instance is in the **inactive** state, listeners of the CLB instance do not forward traffic.

>  If all listeners of a CLB instance are deleted, the CLB instance automatically switches to the **inactive** state.

This parameter is required.', example='active'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the CLB instance is deployed.

You can query region IDs from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model SetLoadBalancerStatusResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerStatusResponseBody(name='body'),
}

/**
 * @summary Modifies the state of a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerStatusResponse
 */
async function setLoadBalancerStatusWithOptions(request: SetLoadBalancerStatusRequest, runtime: Util.RuntimeOptions): SetLoadBalancerStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerStatus)) {
    query['LoadBalancerStatus'] = request.loadBalancerStatus;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerStatus',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the state of a Classic Load Balancer (CLB) instance.
 *
 * @param request SetLoadBalancerStatusRequest
 * @return SetLoadBalancerStatusResponse
 */
async function setLoadBalancerStatus(request: SetLoadBalancerStatusRequest): SetLoadBalancerStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerStatusWithOptions(request, runtime);
}

model SetLoadBalancerTCPListenerAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the network access control list (ACL) that is associated with the listener.

If **AclStatus** is set to **on**, this parameter is required.', example='12333'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  aclType?: string(name='AclType', description='The type of the network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the allowlist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are rejected. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is required.', example='white'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values: **-1** and **1** to **5120**.

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, you can set this parameter to **-1**, which specifies unlimited bandwidth.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of the maximum bandwidth values of all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='43'),
  connectionDrain?: string(name='ConnectionDrain', description='Specifies whether to enable connection draining. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  connectionDrainTimeout?: int32(name='ConnectionDrainTimeout', description='The timeout period of connection draining. This parameter is required if **ConnectionDrain** is set to **on**. Unit: seconds.

Valid values: **10** to **900**.', example='300'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='tcp_80'),
  establishedTimeout?: int32(name='EstablishedTimeout', description='The timeout period of a connection. Unit: seconds. Valid values: **10** to **900**.', example='500'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks. Valid values: **1** to **65535**.

If you do not set this parameter, the port specified by the **BackendServerPort** parameter is used.', example='8080'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period of a health check.

If a backend ECS instance does not return a health check response within the specified timeout period, the server fails the health check.

Valid values: **1** to **300**. Unit: seconds.

>  If the value of the **HealthCheckConnectTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the timeout period specified by the **HCTimeout** parameter is ignored and the period of time specified by the **HealthCheckInterval** parameter is used as the timeout period.', example='100'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. You can set this parameter when the TCP listener requires HTTP health checks. If you do not set this parameter, TCP health checks are performed.

*   **$_ip**: the private IP addresses of the backend servers.

    If you do not set the HealthCheckHost parameter or set the parameter to $SERVER_IP, the CLB instance uses the private IP addresses of backend servers for health checks.

*   **domain**: The domain name is 1 to 80 characters in length, and can contain letters, digits, periods (.), and hyphens (-).', example='192.168.XX.XX'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,).

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.', example='http_2xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds.

Valid values: **1** to **50**.', example='5'),
  healthCheckSwitch?: string(name='HealthCheckSwitch', description='Specifies whether to enable the health check feature. Valid values:

*   **on**: yes
*   **off**: no', example='on'),
  healthCheckType?: string(name='HealthCheckType', description='The type of the health check. Valid values: **tcp** and **http**.', example='tcp'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks. The URI must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/).

You can set this parameter when the TCP listener requires HTTP health checks.

If you do not set this parameter, TCP health checks are performed.', example='/test/index.html'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1ygod3yctvg1y****'),
  masterSlaveServerGroup?: string(name='MasterSlaveServerGroup', description='Specifies whether to use a primary/secondary server group. Valid values:

*   **on**: yes
*   **off**: no

You cannot set both **VserverGroup** and **MasterSlaveServerGroup** to **on**.', example='on'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.

>  You can set only one of the VServerGroupId and MasterSlaveServerGroupId parameters.', example='rsp-cige****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  persistenceTimeout?: int32(name='PersistenceTimeout', description='The timeout period of session persistence. Valid values: **0** to **3600**. Unit: seconds.

Default value: **0**. If the default value is used, the system disables session persistence.', example='0'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false**: no', example='false'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can query the region ID from the [Regions and zones](https://help.aliyun.com/document_detail/40654.html) list or by calling the [DescribeRegions](~~DescribeRegions~~) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers that have higher weights receive more requests than backend servers that have lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.
*   **sch**: specifies consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.
*   **tch**: specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are distributed to the same backend server.

> 
*   Only high-performance CLB instances support the **sch** and **tch** algorithms.
*   CLB does not support converting the **wrr** and **rr** algorithms to sch or tch. You cannot switch the hash algorithm from one to another.', example='wrr'),
  synProxy?: string(name='SynProxy', description='Specifies whether to enable the SynProxy feature of CLB for protection. Valid values:

*   **enable**: yes
*   **disable**: no

We recommend that you use the default value of this parameter.', example='enable'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.', example='4'),
  VServerGroup?: string(name='VServerGroup', description='Specifies whether to use a vServer group. Valid values:

*   **on**: yes
*   **off**: no

>  You cannot set both **VserverGroup** and **MasterSlaveServerGroup** to **on**.', example='on'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6j5****'),
}

model SetLoadBalancerTCPListenerAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerTCPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerTCPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of a TCP listener of Classic Load Balancer (CLB).
 *
 * @description *   A CLB instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/2401685.html).
 * *   A TCP listener is created. For more information, see [CreateLoadBalancerTCPListener](~~CreateLoadBalancerTCPListener~~).
 *
 * @param request SetLoadBalancerTCPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerTCPListenerAttributeResponse
 */
async function setLoadBalancerTCPListenerAttributeWithOptions(request: SetLoadBalancerTCPListenerAttributeRequest, runtime: Util.RuntimeOptions): SetLoadBalancerTCPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.connectionDrain)) {
    query['ConnectionDrain'] = request.connectionDrain;
  }
  if (!Util.isUnset(request.connectionDrainTimeout)) {
    query['ConnectionDrainTimeout'] = request.connectionDrainTimeout;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.establishedTimeout)) {
    query['EstablishedTimeout'] = request.establishedTimeout;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckConnectTimeout)) {
    query['HealthCheckConnectTimeout'] = request.healthCheckConnectTimeout;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckSwitch)) {
    query['HealthCheckSwitch'] = request.healthCheckSwitch;
  }
  if (!Util.isUnset(request.healthCheckType)) {
    query['HealthCheckType'] = request.healthCheckType;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.masterSlaveServerGroup)) {
    query['MasterSlaveServerGroup'] = request.masterSlaveServerGroup;
  }
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.persistenceTimeout)) {
    query['PersistenceTimeout'] = request.persistenceTimeout;
  }
  if (!Util.isUnset(request.proxyProtocolV2Enabled)) {
    query['ProxyProtocolV2Enabled'] = request.proxyProtocolV2Enabled;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.synProxy)) {
    query['SynProxy'] = request.synProxy;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroup)) {
    query['VServerGroup'] = request.VServerGroup;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerTCPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configurations of a TCP listener of Classic Load Balancer (CLB).
 *
 * @description *   A CLB instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/2401685.html).
 * *   A TCP listener is created. For more information, see [CreateLoadBalancerTCPListener](~~CreateLoadBalancerTCPListener~~).
 *
 * @param request SetLoadBalancerTCPListenerAttributeRequest
 * @return SetLoadBalancerTCPListenerAttributeResponse
 */
async function setLoadBalancerTCPListenerAttribute(request: SetLoadBalancerTCPListenerAttributeRequest): SetLoadBalancerTCPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerTCPListenerAttributeWithOptions(request, runtime);
}

model SetLoadBalancerUDPListenerAttributeRequest {
  aclId?: string(name='AclId', description='The ID of the network access control list (ACL) that is associated with the listener.

>  If **AclStatus** is set to **on**, this parameter is required.', example='off'),
  aclStatus?: string(name='AclStatus', description='Specifies whether to enable access control. Valid values:

*   **on**: yes
*   **off**: no', example='off'),
  aclType?: string(name='AclType', description='The type of the network ACL. Valid values:

*   **white**: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios where you want to allow only specific IP addresses to access an application. Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener.

    If you enable a whitelist but do not add an IP address to the ACL, the listener forwards all requests.

*   **black**: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are denied. Blacklists apply to scenarios where you want to block access from specified IP addresses to an application.

    If a blacklist is configured for a listener but no IP address is added to the blacklist, the listener forwards all requests.

>  If **AclStatus** is set to **on**, this parameter is required.', example='white'),
  bandwidth?: int32(name='Bandwidth', description='The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

*   **-1**: For a pay-by-data-transfer Internet-facing CLB instance, you can set this parameter to **-1**. This way, the bandwidth of the listener is unlimited.
*   **1** to **5120**: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of bandwidth limits that you set for all listeners cannot exceed the maximum bandwidth of the CLB instance.', example='-1'),
  description?: string(name='Description', description='The name of the listener.

The name must be 1 to 256 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).', example='udp_80'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks.

Valid values: **1** to **65535**.', example='80'),
  healthCheckConnectTimeout?: int32(name='HealthCheckConnectTimeout', description='The timeout period of a health check. If a backend server, such as an Elastic Compute Service (ECS) instance, does not return a health check response within the specified timeout period, the server fails the health check. Unit: seconds.

Valid values: **1** to **300**.

>  If the value of the **HealthCheckConnectTimeout** parameter is smaller than that of the **HealthCheckInterval** parameter, the timeout period specified by the **HealthCheckConnectTimeout** parameter is ignored and the period of time specified by the **HealthCheckInterval** parameter is used as the timeout period.', example='100'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval at which health checks are performed. Unit: seconds.

Valid values: **1** to **50**.', example='5'),
  healthCheckSwitch?: string(name='HealthCheckSwitch', description='Specifies whether to enable the health check feature. Valid values:

*   **on** (default): yes
*   **off**: no', example='on'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it can be declared healthy (from **fail** to **success**).

Valid values: **1** to **10**.', example='4'),
  listenerPort?: int32(name='ListenerPort', description='The frontend port used by the CLB instance.

Valid values: **1** to **65535**.

This parameter is required.', example='80'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the CLB instance.

This parameter is required.', example='lb-bp1rtfnodmywb43ecu4sf-c****'),
  masterSlaveServerGroup?: string(name='MasterSlaveServerGroup', description='Specifies whether to use a primary/secondary server group. Valid values:

*   **on**: yes
*   **off**: no

>  You cannot set **VserverGroup** and **MasterSlaveServerGroup** both to **on**.', example='on'),
  masterSlaveServerGroupId?: string(name='MasterSlaveServerGroupId', description='The ID of the primary/secondary server group.

>  You cannot specify both VServerGroupId and MasterSlaveServerGroupId.', example='rsp-0bfuc****'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  proxyProtocolV2Enabled?: boolean(name='ProxyProtocolV2Enabled', description='Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:

*   **true**: yes
*   **false** (default): no', example='false'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers with higher weights receive more requests than those with lower weights.

    If two backend servers have the same weight, the backend server that has fewer connections is expected to receive more requests.

*   **rr**: Requests are distributed to backend servers in sequence.

*   **sch**: specifies consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.

*   **tch**: specifies consistent hashing that is based on the following parameters: source IP address, destination IP address, source port, and destination port. Requests that contain the same preceding information are distributed to the same backend server.

*   **qch**: specifies consistent hashing that is based on QUIC connection IDs. Requests that contain the same QUIC connection ID are distributed to the same backend server.

> 
*   Only high-performance CLB instances support **sch**, **tch**, and **qch**.
*   You cannot switch the algorithm used by a CLB instance from **wrr** or **rr** to consistent hashing or from consistent hashing to weighted round robin or round robin.', example='wrr'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **1** to **10**.', example='4'),
  VServerGroup?: string(name='VServerGroup', description='Specifies whether to use a vServer group. Valid values:

*   **on**: yes
*   **off**: no

>  You cannot set both **VserverGroup** and **MasterSlaveServerGroup** to **on**.', example='on'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6****'),
  healthCheckExp?: string(name='healthCheckExp', description='The response string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits.', example='ok'),
  healthCheckReq?: string(name='healthCheckReq', description='The request string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits.', example='hello'),
}

model SetLoadBalancerUDPListenerAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model SetLoadBalancerUDPListenerAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetLoadBalancerUDPListenerAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of a UDP listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   A UDP listener is created. For more information, see [CreateLoadBalancerUDPListener](https://help.aliyun.com/document_detail/27595.html).
 *
 * @param request SetLoadBalancerUDPListenerAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetLoadBalancerUDPListenerAttributeResponse
 */
async function setLoadBalancerUDPListenerAttributeWithOptions(request: SetLoadBalancerUDPListenerAttributeRequest, runtime: Util.RuntimeOptions): SetLoadBalancerUDPListenerAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aclId)) {
    query['AclId'] = request.aclId;
  }
  if (!Util.isUnset(request.aclStatus)) {
    query['AclStatus'] = request.aclStatus;
  }
  if (!Util.isUnset(request.aclType)) {
    query['AclType'] = request.aclType;
  }
  if (!Util.isUnset(request.bandwidth)) {
    query['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckConnectTimeout)) {
    query['HealthCheckConnectTimeout'] = request.healthCheckConnectTimeout;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckSwitch)) {
    query['HealthCheckSwitch'] = request.healthCheckSwitch;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.masterSlaveServerGroup)) {
    query['MasterSlaveServerGroup'] = request.masterSlaveServerGroup;
  }
  if (!Util.isUnset(request.masterSlaveServerGroupId)) {
    query['MasterSlaveServerGroupId'] = request.masterSlaveServerGroupId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.proxyProtocolV2Enabled)) {
    query['ProxyProtocolV2Enabled'] = request.proxyProtocolV2Enabled;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroup)) {
    query['VServerGroup'] = request.VServerGroup;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.healthCheckExp)) {
    query['healthCheckExp'] = request.healthCheckExp;
  }
  if (!Util.isUnset(request.healthCheckReq)) {
    query['healthCheckReq'] = request.healthCheckReq;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLoadBalancerUDPListenerAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configurations of a UDP listener.
 *
 * @description *   A Classic Load Balancer (CLB) instance is created. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/27577.html).
 * *   A UDP listener is created. For more information, see [CreateLoadBalancerUDPListener](https://help.aliyun.com/document_detail/27595.html).
 *
 * @param request SetLoadBalancerUDPListenerAttributeRequest
 * @return SetLoadBalancerUDPListenerAttributeResponse
 */
async function setLoadBalancerUDPListenerAttribute(request: SetLoadBalancerUDPListenerAttributeRequest): SetLoadBalancerUDPListenerAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLoadBalancerUDPListenerAttributeWithOptions(request, runtime);
}

model SetRuleRequest {
  cookie?: string(name='Cookie', description='The cookie that is configured on the server.

The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($).

>  This parameter is required and takes effect if **StickySession** is set to **on** and **StickySessionType** is set to **server**.', example='23ffsa'),
  cookieTimeout?: int32(name='CookieTimeout', description='The timeout period of a cookie. Unit: seconds. Valid values: **1** to **86400**.

>  This parameter is required and takes effect if **StickySession** is set to **on** and **StickySessionType** is set to **insert**.', example='123'),
  healthCheck?: string(name='HealthCheck', description='Specifies whether to enable the health check feature. Valid values:

*   **on**: yes
*   **off**: no

>  This parameter is required and takes effect if the **ListenerSync** parameter is set to **off**.', example='off'),
  healthCheckConnectPort?: int32(name='HealthCheckConnectPort', description='The port that is used for health checks. Valid values: **1** to **65535**.

>  This parameter takes effect when the **HealthCheck** parameter is set to **on**.', example='80'),
  healthCheckDomain?: string(name='HealthCheckDomain', description='The domain name that is used for health checks. Valid values:

*   **$_ip**: the private IP address of a backend server. If you do not set this parameter or set the parameter to $_ip, the SLB instance uses the private IP address of each backend server for health checks.
*   **domain**: The domain name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), and hyphens (-).

>  This parameter takes effect if the **HealthCheck** parameter is set to **on**.', example='$_ip'),
  healthCheckHttpCode?: string(name='HealthCheckHttpCode', description='The HTTP status code for a successful health check. Multiple HTTP status codes are separated by commas (,).

Valid values: **http_2xx**, **http_3xx**, **http_4xx**, and **http_5xx**.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='http_2xx'),
  healthCheckInterval?: int32(name='HealthCheckInterval', description='The interval between two consecutive health checks. Unit: seconds. Valid values: **1** to **50**.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='20'),
  healthCheckTimeout?: int32(name='HealthCheckTimeout', description='The timeout period of a health check response. If a backend server, such as an Elastic Compute Service (ECS) instance, does not return a health check response within the specified timeout period, the server fails the health check. Unit: seconds. Valid values: **1** to **300**.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='20'),
  healthCheckURI?: string(name='HealthCheckURI', description='The URI that is used for health checks.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='/example'),
  healthyThreshold?: int32(name='HealthyThreshold', description='The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from **fail** to **success**.

Valid values: **2** to **10**.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='4'),
  listenerSync?: string(name='ListenerSync', description='Specifies whether to use the scheduling algorithm, session persistence, and health check configurations of the listener. Valid values:

*   **on**: uses the configurations of the listener.
*   **off**: does not use the configurations of the listener. You can customize the health check and session persistence configurations for the forwarding rule.', example='off'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  ruleId?: string(name='RuleId', description='The ID of the forwarding rule.

This parameter is required.', example='rule-3ejhkt****'),
  ruleName?: string(name='RuleName', description='The name of the forwarding rule. The name must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).

>  Forwarding rule names must be unique within the same listener.', example='doctest'),
  scheduler?: string(name='Scheduler', description='The scheduling algorithm. Valid values:

*   **wrr**: Backend servers with higher weights receive more requests than those with lower weights.
*   **rr**: Requests are distributed to backend servers in sequence.

>  This parameter is required and takes effect if the **ListenerSync** parameter is set to **off**.', example='wrr'),
  stickySession?: string(name='StickySession', description='Specifies whether to enable session persistence. Valid values:

*   **on**: yes
*   **off**: no

This parameter is required and takes effect if the **ListenerSync** parameter is set to **off**.', example='off'),
  stickySessionType?: string(name='StickySessionType', description='The method that is used to handle a cookie. Valid values:

*   **insert**: inserts a cookie.

    CLB inserts the backend server ID as a cookie into the first HTTP or HTTPS response that is sent to a client. The next request from the client will contain this cookie, and the listener will distribute this request to the recorded backend server.

*   **server**: rewrites a cookie.

    When CLB detects a user-defined cookie, it overwrites the original cookie with the user-defined cookie. The next request from the client will contain the user-defined cookie, and the listener will distribute this request to the recorded backend server.

>  This parameter is required and takes effect if the **StickySession** parameter is set to **on**.', example='insert'),
  unhealthyThreshold?: int32(name='UnhealthyThreshold', description='The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from **success** to **fail**.

Valid values: **2** to **10**.

>  This parameter is required and takes effect if the **HealthCheck** parameter is set to **on**.', example='4'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group that is associated with the forwarding rule.', example='rsp-cige6****'),
}

model SetRuleResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
}

model SetRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetRuleResponseBody(name='body'),
}

/**
 * @summary Modifies a forwarding rule that is associated with a vServer group.
 *
 * @param request SetRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetRuleResponse
 */
async function setRuleWithOptions(request: SetRuleRequest, runtime: Util.RuntimeOptions): SetRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cookie)) {
    query['Cookie'] = request.cookie;
  }
  if (!Util.isUnset(request.cookieTimeout)) {
    query['CookieTimeout'] = request.cookieTimeout;
  }
  if (!Util.isUnset(request.healthCheck)) {
    query['HealthCheck'] = request.healthCheck;
  }
  if (!Util.isUnset(request.healthCheckConnectPort)) {
    query['HealthCheckConnectPort'] = request.healthCheckConnectPort;
  }
  if (!Util.isUnset(request.healthCheckDomain)) {
    query['HealthCheckDomain'] = request.healthCheckDomain;
  }
  if (!Util.isUnset(request.healthCheckHttpCode)) {
    query['HealthCheckHttpCode'] = request.healthCheckHttpCode;
  }
  if (!Util.isUnset(request.healthCheckInterval)) {
    query['HealthCheckInterval'] = request.healthCheckInterval;
  }
  if (!Util.isUnset(request.healthCheckTimeout)) {
    query['HealthCheckTimeout'] = request.healthCheckTimeout;
  }
  if (!Util.isUnset(request.healthCheckURI)) {
    query['HealthCheckURI'] = request.healthCheckURI;
  }
  if (!Util.isUnset(request.healthyThreshold)) {
    query['HealthyThreshold'] = request.healthyThreshold;
  }
  if (!Util.isUnset(request.listenerSync)) {
    query['ListenerSync'] = request.listenerSync;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleName)) {
    query['RuleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.scheduler)) {
    query['Scheduler'] = request.scheduler;
  }
  if (!Util.isUnset(request.stickySession)) {
    query['StickySession'] = request.stickySession;
  }
  if (!Util.isUnset(request.stickySessionType)) {
    query['StickySessionType'] = request.stickySessionType;
  }
  if (!Util.isUnset(request.unhealthyThreshold)) {
    query['UnhealthyThreshold'] = request.unhealthyThreshold;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetRule',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies a forwarding rule that is associated with a vServer group.
 *
 * @param request SetRuleRequest
 * @return SetRuleResponse
 */
async function setRule(request: SetRuleRequest): SetRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return setRuleWithOptions(request, runtime);
}

model SetServerCertificateNameRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region ID of the Classic Load Balancer (CLB) instance. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/2401682.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.

This parameter is required.', example='139a00604ad-cn-east-hangzhou-01'),
  serverCertificateName?: string(name='ServerCertificateName', description='The name of the third-party server certificate that you want to upload. The name must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), underscores (_), and asterisks (\\\\*).

This parameter is required.', example='abc'),
}

model SetServerCertificateNameResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='CEF72CEB-54B6-4AE8-B225-F876FE7BA984'),
}

model SetServerCertificateNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetServerCertificateNameResponseBody(name='body'),
}

/**
 * @summary Sets a name for a server certificate.
 *
 * @param request SetServerCertificateNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetServerCertificateNameResponse
 */
async function setServerCertificateNameWithOptions(request: SetServerCertificateNameRequest, runtime: Util.RuntimeOptions): SetServerCertificateNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificateId)) {
    query['ServerCertificateId'] = request.serverCertificateId;
  }
  if (!Util.isUnset(request.serverCertificateName)) {
    query['ServerCertificateName'] = request.serverCertificateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetServerCertificateName',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Sets a name for a server certificate.
 *
 * @param request SetServerCertificateNameRequest
 * @return SetServerCertificateNameResponse
 */
async function setServerCertificateName(request: SetServerCertificateNameRequest): SetServerCertificateNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return setServerCertificateNameWithOptions(request, runtime);
}

model SetTLSCipherPolicyAttributeRequest {
  ciphers?: [ string ](name='Ciphers', description='The cipher suites supported by the TLS version.

The specified cipher suites must be supported by at least one TLS protocol version that you specify. For example, if you set the TLSVersions parameter to TLSv1.3, you must specify cipher suites that are supported by this protocol version.

TLS 1.0 and TLS 1.1 support the following cipher suites:

*   ECDHE-ECDSA-AES128-SHA
*   ECDHE-ECDSA-AES256-SHA
*   ECDHE-RSA-AES128-SHA
*   ECDHE-RSA-AES256-SHA
*   AES128-SHA AES256-SHA
*   DES-CBC3-SHA

TLS 1.2 supports the following cipher suites:

*   ECDHE-ECDSA-AES128-SHA
*   ECDHE-ECDSA-AES256-SHA
*   ECDHE-RSA-AES128-SHA
*   ECDHE-RSA-AES256-SHA
*   AES128-SHA AES256-SHA
*   DES-CBC3-SHA
*   ECDHE-ECDSA-AES128-GCM-SHA256
*   ECDHE-ECDSA-AES256-GCM-SHA384
*   ECDHE-ECDSA-AES128-SHA256
*   ECDHE-ECDSA-AES256-SHA384
*   ECDHE-RSA-AES128-GCM-SHA256
*   ECDHE-RSA-AES256-GCM-SHA384
*   ECDHE-RSA-AES128-SHA256
*   ECDHE-RSA-AES256-SHA384
*   AES128-GCM-SHA256
*   AES256-GCM-SHA384
*   AES128-SHA256 AES256-SHA256

TLS 1.3 supports the following cipher suites:

*   TLS_AES_128_GCM_SHA256
*   TLS_AES_256_GCM_SHA384
*   TLS_CHACHA20_POLY1305_SHA256
*   TLS_AES_128_CCM_SHA256
*   TLS_AES_128_CCM_8_SHA256

This parameter is required.', example='DES-CBC3-SHA'),
  name?: string(name='Name', description='The name of the TLS policy. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

This parameter is required.', example='tls-policy*****-test'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/36063.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  TLSCipherPolicyId?: string(name='TLSCipherPolicyId', description='The ID of the TLS policy.

This parameter is required.', example='tls-bp1lp2076qx4e******bridp'),
  TLSVersions?: [ string ](name='TLSVersions', description='The version of the TLS protocol. Valid values: **TLSv1.0**, **TLSv1.1**, **TLSv1.2**, and **TLSv1.3**.

This parameter is required.', example='TLSv1.0'),
}

model SetTLSCipherPolicyAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
  taskId?: string(name='TaskId', description='The ID of the asynchronous task.', example='72dcd26b-f12d-4c27-b3af****-18f6aed5'),
}

model SetTLSCipherPolicyAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetTLSCipherPolicyAttributeResponseBody(name='body'),
}

/**
 * @summary Configures a Transport Layer Security (TLS) policy.
 *
 * @param request SetTLSCipherPolicyAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetTLSCipherPolicyAttributeResponse
 */
async function setTLSCipherPolicyAttributeWithOptions(request: SetTLSCipherPolicyAttributeRequest, runtime: Util.RuntimeOptions): SetTLSCipherPolicyAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ciphers)) {
    query['Ciphers'] = request.ciphers;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.TLSCipherPolicyId)) {
    query['TLSCipherPolicyId'] = request.TLSCipherPolicyId;
  }
  if (!Util.isUnset(request.TLSVersions)) {
    query['TLSVersions'] = request.TLSVersions;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetTLSCipherPolicyAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Configures a Transport Layer Security (TLS) policy.
 *
 * @param request SetTLSCipherPolicyAttributeRequest
 * @return SetTLSCipherPolicyAttributeResponse
 */
async function setTLSCipherPolicyAttribute(request: SetTLSCipherPolicyAttributeRequest): SetTLSCipherPolicyAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setTLSCipherPolicyAttributeWithOptions(request, runtime);
}

model SetVServerGroupAttributeRequest {
  backendServers?: string(name='BackendServers', description='The list of backend servers in the vServer group. You can specify at most 20 backend servers for a vServer group in each call.

*   **ServerId**: required. The ID of the Elastic Compute Service (ECS) instance or elastic network interface (ENI) that serves as a backend server. This parameter must be of the STRING type.

*   **Port**: required. The port that is used by the backend server. This parameter must be of the INTEGER type. Valid values: **1 to 65535**.

*   **Weight**: required. The weight of the backend server. This parameter must be of the INTEGER type. You can modify this parameter. Valid values: **0 to 100**.

*   **Description**: optional. The description of the backend server. This parameter must be of the STRING type. You can modify this parameter. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).

*   **Type**: the type of backend server. This parameter must be of the STRING type. Valid values:

    *   **ecs**: an ECS instance. This is the default value.
    *   **eni**: an ENI.

*   **ServerIp**: the IP address of the ECS instance or ENI.

Examples:

*   An ECS instance: `[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]`
*   An ENI: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" }]`
*   An ENI with multiple IP addresses: `[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.\\*\\*.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.\\*\\*.**", "Port":"80","Description":"test-113" }]`', example='[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.XX.XX.6", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.XX.XX.6", "Port":"80","Description":"test-113" }]'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed. This parameter cannot be modified.

This parameter is required.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group. This parameter cannot be modified.

This parameter is required.', example='rsp-cige6****'),
  VServerGroupName?: string(name='VServerGroupName', description='The name of the vServer group. You can specify a custom name for the vServer group.', example='Group1'),
}

model SetVServerGroupAttributeResponseBody = {
  backendServers?: {
    backendServer?: [ 
    {
      description?: string(name='Description', description='The description of the vServer group.', example='Backend server group description'),
      port?: int32(name='Port', description='The port that is used by the backend server.', example='70'),
      serverId?: string(name='ServerId', description='The ID of the ECS instance or ENI.', example='i-bp1ek6yd7jvkx****'),
      type?: string(name='Type', description='The type of backend server. Valid values:

*   **ecs**: an ECS instance
*   **eni**: an ENI', example='ecs'),
      weight?: int32(name='Weight', description='The weight of the backend server.', example='100'),
    }
  ](name='BackendServer')
  }(name='BackendServers', description='The list of backend servers.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C'),
  VServerGroupId?: string(name='VServerGroupId', description='The ID of the vServer group.', example='rsp-cige6****'),
  VServerGroupName?: string(name='VServerGroupName', description='The name of the vServer group.', example='Group1'),
}

model SetVServerGroupAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetVServerGroupAttributeResponseBody(name='body'),
}

/**
 * @summary Modifies the configurations of a vServer group.
 *
 * @description This operation allows you to modify only the name of a vServer group and the weights of the backend servers in the vServer group.
 * *   If you want to modify backend servers in a specified vServer group, call the [ModifyVServerGroupBackendServers](https://help.aliyun.com/document_detail/35220.html) operation.
 * *   If you want to add backend servers to a specified vServer group, call the [AddVServerGroupBackendServers](https://help.aliyun.com/document_detail/35218.html) operation.
 *
 * @param request SetVServerGroupAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetVServerGroupAttributeResponse
 */
async function setVServerGroupAttributeWithOptions(request: SetVServerGroupAttributeRequest, runtime: Util.RuntimeOptions): SetVServerGroupAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backendServers)) {
    query['BackendServers'] = request.backendServers;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.VServerGroupId)) {
    query['VServerGroupId'] = request.VServerGroupId;
  }
  if (!Util.isUnset(request.VServerGroupName)) {
    query['VServerGroupName'] = request.VServerGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetVServerGroupAttribute',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Modifies the configurations of a vServer group.
 *
 * @description This operation allows you to modify only the name of a vServer group and the weights of the backend servers in the vServer group.
 * *   If you want to modify backend servers in a specified vServer group, call the [ModifyVServerGroupBackendServers](https://help.aliyun.com/document_detail/35220.html) operation.
 * *   If you want to add backend servers to a specified vServer group, call the [AddVServerGroupBackendServers](https://help.aliyun.com/document_detail/35218.html) operation.
 *
 * @param request SetVServerGroupAttributeRequest
 * @return SetVServerGroupAttributeResponse
 */
async function setVServerGroupAttribute(request: SetVServerGroupAttributeRequest): SetVServerGroupAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setVServerGroupAttributeWithOptions(request, runtime);
}

model StartLoadBalancerListenerRequest {
  listenerPort?: int32(name='ListenerPort', description='The listener port of the SLB instance.

Valid values: **1 to 65535**.

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The protocol used by the listener of the SLB instance.

>  If different listeners use the same port, you must specify this parameter.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance.

This parameter is required.', example='lb-bp13jaf5qli5*********'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region where the SLB instance is deployed.

You can retrieve the region ID by calling the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation.', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model StartLoadBalancerListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model StartLoadBalancerListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartLoadBalancerListenerResponseBody(name='body'),
}

/**
 * @summary You can call this operation to start a listener.
 *
 * @description When you call this operation, note the following items:
 * *   You can call the operation only when the listener is in the Stopped state.
 * *   After the operation is called, the status of the listener changes to Starting.
 * *   You cannot call this operation when the SLB instance to which the listener is bound is in the Locked state.
 *
 * @param request StartLoadBalancerListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartLoadBalancerListenerResponse
 */
async function startLoadBalancerListenerWithOptions(request: StartLoadBalancerListenerRequest, runtime: Util.RuntimeOptions): StartLoadBalancerListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartLoadBalancerListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary You can call this operation to start a listener.
 *
 * @description When you call this operation, note the following items:
 * *   You can call the operation only when the listener is in the Stopped state.
 * *   After the operation is called, the status of the listener changes to Starting.
 * *   You cannot call this operation when the SLB instance to which the listener is bound is in the Locked state.
 *
 * @param request StartLoadBalancerListenerRequest
 * @return StartLoadBalancerListenerResponse
 */
async function startLoadBalancerListener(request: StartLoadBalancerListenerRequest): StartLoadBalancerListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return startLoadBalancerListenerWithOptions(request, runtime);
}

model StopLoadBalancerListenerRequest {
  listenerPort?: int32(name='ListenerPort', description='The frontend listening port used by the listener.

Value range: **1 to 65535**

This parameter is required.', example='80'),
  listenerProtocol?: string(name='ListenerProtocol', description='The frontend listening protocol used by the SLB instance.

>  This parameter is required when listeners with different protocols use the same port.', example='https'),
  loadBalancerId?: string(name='LoadBalancerId', description='The ID of the SLB instance to which the listener belongs.

This parameter is required.', example='lb-bp13jaf5qli5xmgl1miup'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region to which the SLB instance belongs.

To query the region ID, refer to the list of [regions and zones](https://help.aliyun.com/document_detail/40654.html) or call [DescribeRegions](https://help.aliyun.com/document_detail/25609.html).', example='cn-hangzhou'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model StopLoadBalancerListenerResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='CEF72CEB-54B6-4AE8-B225-F876FF7BA984'),
}

model StopLoadBalancerListenerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopLoadBalancerListenerResponseBody(name='body'),
}

/**
 * @summary Stops a listener.
 *
 * @description Before you make this API call, note the following:
 * *   After the API call is successfully made, the listener enters the stopped state.
 * *   If the Server Load Balancer (SLB) instance to which the listener to be stopped belongs is in the locked state, this API call cannot be made.
 * >  If you stop the listener, your services will be disrupted. Exercise caution when you perform this action.
 *
 * @param request StopLoadBalancerListenerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopLoadBalancerListenerResponse
 */
async function stopLoadBalancerListenerWithOptions(request: StopLoadBalancerListenerRequest, runtime: Util.RuntimeOptions): StopLoadBalancerListenerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.listenerPort)) {
    query['ListenerPort'] = request.listenerPort;
  }
  if (!Util.isUnset(request.listenerProtocol)) {
    query['ListenerProtocol'] = request.listenerProtocol;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    query['LoadBalancerId'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopLoadBalancerListener',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Stops a listener.
 *
 * @description Before you make this API call, note the following:
 * *   After the API call is successfully made, the listener enters the stopped state.
 * *   If the Server Load Balancer (SLB) instance to which the listener to be stopped belongs is in the locked state, this API call cannot be made.
 * >  If you stop the listener, your services will be disrupted. Exercise caution when you perform this action.
 *
 * @param request StopLoadBalancerListenerRequest
 * @return StopLoadBalancerListenerResponse
 */
async function stopLoadBalancerListener(request: StopLoadBalancerListenerRequest): StopLoadBalancerListenerResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLoadBalancerListenerWithOptions(request, runtime);
}

model TagResourcesRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceId?: [ string ](name='ResourceId', description='The resource ID. You can specify up to 20 IDs.

>  The value of **ResourceId** of a **listener** is **LoadBalancerId_ Listener protocol_Port**, where LoadBalancerId is the SLB instance ID and port is the listener port. Example: lb-bp1snb10sbml4mqty_http_80.

This parameter is required.', example='lb-bp16qjewdsunr41m1****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **instance**: a Server Load Balancer (SLB) instance
*   **certificate**: a certificate
*   **acl**: an access control list (ACL)
*   **listener**: a listener
*   **vservergroup**: a vServer group
*   **masterslaveservergroup**: a primary/secondary server group

This parameter is required.', example='instance'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. The tag key cannot contain `http://` or `https://`.', example='FinanceDept'),
      value?: string(name='Value', description='The tag value. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'),
    }
  ](name='Tag', description='The tags.

This parameter is required.'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='C46FF5A8-C5F0-4024-8262-B16B639225A0'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary Creates tags and adds the tags to resources.
 *
 * @description >  You can add at most 20 tags to each instance. Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number is reached, an error message is returned.
 *
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Creates tags and adds the tags to resources.
 *
 * @description >  You can add at most 20 tags to each instance. Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number is reached, an error message is returned.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', description='Specifies whether to remove all tags from the specified one or more resources. This parameter takes effect only if the **TagKey.N** parameter is not set.

Valid values: **true** and **false**.', example='true'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The ID of the region where the Server Load Balancer (SLB) instance is created.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceId?: [ string ](name='ResourceId', description='The ID of the resource. Valid values of N: 1 to 20.

This parameter is required.', example='lb-bp16qjewdsunr41m1****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   **instance**: an SLB instance
*   **certificate**: a certificate
*   **acl**: a network access control list (ACL)

This parameter is required.', example='instance'),
  tagKey?: [ string ](name='TagKey', description='The tag value. Valid values of N: **1** to **20**.

The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`.

>  If you do not set **TagKey**, all tags of the specified instance are removed.', example='FinanceDept'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='C46FF5A8-C5F0-4024-8262-B16B639225A0'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary Removes tags from specified resources.
 *
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Removes tags from specified resources.
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UploadCACertificateRequest {
  CACertificate?: string(name='CACertificate', description='The name of this action.

Value: **UploadCACertificate**

This parameter is required.', example='test'),
  CACertificateName?: string(name='CACertificateName', description='The ID of the region to which the CA certificate belongs.

To query the region ID, call [DescribeRegions](https://help.aliyun.com/document_detail/27584.html).', example='mycacert01'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='The region id.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The content of the CA certificate to be uploaded.', example='rg-atstuj3rtoptyui'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key. You can specify at most 20 tag keys.

The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='TestKey'),
      value?: string(name='Value', description='The tag value. Valid values of N: **1 to 20**. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. The tag value cannot contain `http://` or `https://`.', example='FinanceJoshua'),
    }
  ](name='Tag', description='The tags.', example='UploadCACertificate'),
}

model UploadCACertificateResponseBody = {
  CACertificateId?: string(name='CACertificateId', description='The name of the CA certificate.', example='139a00604ad-cn-east-hangzhou-01'),
  CACertificateName?: string(name='CACertificateName', description='The domain name of the CA certificate.', example='mycacert01'),
  commonName?: string(name='CommonName', description='The fingerprint of the CA certificate.', example='.example.com'),
  createTime?: string(name='CreateTime', description='The time when the CA certificate expires.', example='2017-08-31T02:49:05Z'),
  createTimeStamp?: long(name='CreateTimeStamp', description='The name of the CA certificate.', example='1504147745000'),
  expireTime?: string(name='ExpireTime', description='The timestamp generated when the CA certificate is uploaded.', example='2024-11-21T06:04:25Z'),
  expireTimeStamp?: long(name='ExpireTimeStamp', description='The ID of the enterprise resource group.', example='1732169065000'),
  fingerprint?: string(name='Fingerprint', description='The ID of the request.', example='02:DF:AB:ED'),
  requestId?: string(name='RequestId', description='The ID of the enterprise resource group.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  resourceGroupId?: string(name='ResourceGroupId', description='The time when the CA certificate is uploaded.', example='rg-atstuj3rtoptyui'),
}

model UploadCACertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadCACertificateResponseBody(name='body'),
}

/**
 * @summary Uploads a CA certificate.
 *
 * @description You can upload only one CA certificate at a time. After a CA certificate is uploaded, the certificate ID, name, and fingerprint are returned.
 *
 * @param request UploadCACertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadCACertificateResponse
 */
async function uploadCACertificateWithOptions(request: UploadCACertificateRequest, runtime: Util.RuntimeOptions): UploadCACertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.CACertificate)) {
    query['CACertificate'] = request.CACertificate;
  }
  if (!Util.isUnset(request.CACertificateName)) {
    query['CACertificateName'] = request.CACertificateName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadCACertificate',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Uploads a CA certificate.
 *
 * @description You can upload only one CA certificate at a time. After a CA certificate is uploaded, the certificate ID, name, and fingerprint are returned.
 *
 * @param request UploadCACertificateRequest
 * @return UploadCACertificateResponse
 */
async function uploadCACertificate(request: UploadCACertificateRequest): UploadCACertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadCACertificateWithOptions(request, runtime);
}

model UploadServerCertificateRequest {
  aliCloudCertificateId?: string(name='AliCloudCertificateId', description='AliCloud certificate ID.', example='775****'),
  aliCloudCertificateName?: string(name='AliCloudCertificateName', description='AliCloud certificate name.', example='cloudcertificate'),
  aliCloudCertificateRegionId?: string(name='AliCloudCertificateRegionId', description='The region ID of AliCloud certificate.', example='cn-hangzhou'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  privateKey?: string(name='PrivateKey', description='The private key of the certificate.', example='-----BEGIN RSA PRIVATE KEY----- MIIEogIB****** -----END RSA PRIVATE KEY-----'),
  regionId?: string(name='RegionId', description='The region ID of the CLB instance.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rto****'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  serverCertificate?: string(name='ServerCertificate', description='The server certificate to be uploaded.', example='-----BEGIN CERTIFICATE----- MIIGDTCC****** -----END CERTIFICATE-----'),
  serverCertificateName?: string(name='ServerCertificateName', description='The name of the server certificate.

The name must be 1 to 80 characters in length. It must start with an English letter. It can contain letters, numbers, periods (.), underscores (_), and hyphens (-).', example='mycert01'),
  tag?: [ 
    {
      key?: string(name='Key', description='The key of tag N. Valid values of N: **1 to 20**. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length, and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`.', example='TestKey'),
      value?: string(name='Value', description='The value of tag N. Valid values of N: **1 to 20**. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `aliyun` and `acs:`.', example='TestValue'),
    }
  ](name='Tag', description='The tags.'),
}

model UploadServerCertificateResponseBody = {
  aliCloudCertificateId?: string(name='AliCloudCertificateId', description='The AliCloud certificate ID.', example='775****'),
  aliCloudCertificateName?: string(name='AliCloudCertificateName', description='The AliCloud certificate name.', example='cloudcertificate****'),
  commonName?: string(name='CommonName', description='The domain name of the CA certificate.', example='example.com'),
  createTime?: string(name='CreateTime', description='The time when the CA certificate is uploaded.', example='2022-02-21T02:49:05Z'),
  createTimeStamp?: long(name='CreateTimeStamp', description='The timestamp generated when the CA certificate is uploaded.', example='1504147745000'),
  expireTime?: string(name='ExpireTime', description='The time when the CA certificate expires.', example='2022-10-18T23:59:59Z'),
  expireTimeStamp?: long(name='ExpireTimeStamp', description='The timestamp generated when the CA certificate expires.', example='1504147745000'),
  fingerprint?: string(name='Fingerprint', description='The fingerprint of the CA certificate.', example='8f:7d:cb:e5:f8:c8:33:9c:17:65:c1:92:30:9e:45:55:9c:3a:85:60'),
  isAliCloudCertificate?: int32(name='IsAliCloudCertificate', description='Indicates whether the certificate is provided by Alibaba Cloud Certificate Management Service. Valid values:
- **0**: The certificate is not provided by Alibaba Cloud Certificate Management Service.
- **1**: The certificate is provided by Alibaba Cloud Certificate Management Service.', example='0'),
  regionId?: string(name='RegionId', description='The ID of the region where the Classic Load Balancer (CLB) instance is deployed.

You can call the [DescribeRegions](https://help.aliyun.com/document_detail/27584.html) operation to query the most recent region list.', example='cn-hangzhou'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='365F4154-92F6-4AE4-92F8-7FF34B540710'),
  resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-atstuj3rt****'),
  serverCertificateId?: string(name='ServerCertificateId', description='The ID of the server certificate.', example='1321932713******_17f1b4b696b_1114720822_-1671******'),
  serverCertificateName?: string(name='ServerCertificateName', description='The name of the server certificate.

The name must be 1 to 80 characters in length. It must start with an English letter. It can contain letters, numbers, periods (.), underscores (_), and hyphens (-).', example='mycert01'),
  subjectAlternativeNames?: {
    subjectAlternativeName?: [ string ](name='SubjectAlternativeName')
  }(name='SubjectAlternativeNames', description='The subject alternative names.

A domain name list is supported. A maximum of 10 domain names are supported.'),
}

model UploadServerCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadServerCertificateResponseBody(name='body'),
}

/**
 * @summary Uploads a server certificate.
 *
 * @description *   You can upload only one server certificate and its private key in each call.
 * *   After a server certificate and its private key are uploaded, the fingerprints of all server certificates that belong to your Alibaba Cloud account are returned.
 *
 * @param request UploadServerCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadServerCertificateResponse
 */
async function uploadServerCertificateWithOptions(request: UploadServerCertificateRequest, runtime: Util.RuntimeOptions): UploadServerCertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliCloudCertificateId)) {
    query['AliCloudCertificateId'] = request.aliCloudCertificateId;
  }
  if (!Util.isUnset(request.aliCloudCertificateName)) {
    query['AliCloudCertificateName'] = request.aliCloudCertificateName;
  }
  if (!Util.isUnset(request.aliCloudCertificateRegionId)) {
    query['AliCloudCertificateRegionId'] = request.aliCloudCertificateRegionId;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.privateKey)) {
    query['PrivateKey'] = request.privateKey;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.serverCertificate)) {
    query['ServerCertificate'] = request.serverCertificate;
  }
  if (!Util.isUnset(request.serverCertificateName)) {
    query['ServerCertificateName'] = request.serverCertificateName;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadServerCertificate',
    version = '2014-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Uploads a server certificate.
 *
 * @description *   You can upload only one server certificate and its private key in each call.
 * *   After a server certificate and its private key are uploaded, the fingerprints of all server certificates that belong to your Alibaba Cloud account are returned.
 *
 * @param request UploadServerCertificateRequest
 * @return UploadServerCertificateResponse
 */
async function uploadServerCertificate(request: UploadServerCertificateRequest): UploadServerCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadServerCertificateWithOptions(request, runtime);
}

